diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-11-20 20:15:20 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-11-20 20:15:20 +0400 |
commit | 0a91f285ad4a8d017a508e32a1c5d4deb7e0203a (patch) | |
tree | 4f93f42481705c3afd38cbab8849361c80133400 /mysql-test/r/outfile_loaddata.result | |
parent | 4b48eb6f1e4565ba31982f73908664108ba0fb7b (diff) | |
download | mariadb-git-0a91f285ad4a8d017a508e32a1c5d4deb7e0203a.tar.gz |
Fixed bug #32533.
8bit escape characters, termination and enclosed characters
were silently ignored by SELECT INTO query, but LOAD DATA INFILE
algorithm is 8bit-clean, so data was corrupted during
encoding.
sql/sql_class.cc:
Fixed bug #32533.
SELECT INTO OUTFILE encoding was not 8bit clear, it
has been fixed for a symmetry with the LOAD DATA INFILE
decoding algorithm.
mysql-test/t/outfile_loaddata.test:
Added test case for bug #32533.
mysql-test/r/outfile_loaddata.result:
Added test case for bug #32533.
Diffstat (limited to 'mysql-test/r/outfile_loaddata.result')
-rw-r--r-- | mysql-test/r/outfile_loaddata.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/outfile_loaddata.result b/mysql-test/r/outfile_loaddata.result index 1bcaf308b7c..4a9bdcf412d 100644 --- a/mysql-test/r/outfile_loaddata.result +++ b/mysql-test/r/outfile_loaddata.result @@ -82,4 +82,22 @@ c1 c2 -r- =raker= DROP TABLE t2; DROP TABLE t1; +# +# Bug#32533: SELECT INTO OUTFILE never escapes multibyte character +# +CREATE TABLE t1 (c1 VARCHAR(256)); +INSERT INTO t1 VALUES (0xC3); +SELECT HEX(c1) FROM t1; +HEX(c1) +C3 +SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1; +TRUNCATE t1; +SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt')); +HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt')) +C35CC3C30A +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3; +SELECT HEX(c1) FROM t1; +HEX(c1) +C3 +DROP TABLE t1; # End of 5.0 tests. |