diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
commit | a3d80d952d7b99680ca4a3a89e128ecc0d490c10 (patch) | |
tree | 0d72ee69e037cdd09618ddb53652dd1b220890dc /mysql-test/r/loaddata.result | |
parent | ec06ba24553d2d83b3a6a6bc4d8150910b01ee7c (diff) | |
parent | 966661c8cc75dd7d540a5fe40b4d893c40e91d26 (diff) | |
download | mariadb-git-a3d80d952d7b99680ca4a3a89e128ecc0d490c10.tar.gz |
merge with 5.1
Diffstat (limited to 'mysql-test/r/loaddata.result')
-rw-r--r-- | mysql-test/r/loaddata.result | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 665e80b8ba2..40c278380b1 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -503,4 +503,33 @@ DROP TABLE t1; CREATE TABLE t1 (id INT NOT NULL); LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1; DROP TABLE t1; +# +# Bug #51876 : crash/memory underrun when loading data with ucs2 +# and reverse() function +# +# Problem # 1 (original report): wrong parsing of ucs2 data +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +Warnings: +Warning 1366 Incorrect integer value: '00' for column 'a' at row 1 +Warning 1366 Incorrect integer value: '10' for column 'a' at row 2 +# should return 2 zeroes (as the value is truncated) +SELECT * FROM t1; +a +0 +0 +DROP TABLE t1; +# Problem # 2 : if you write and read ucs2 data to a file they're lost +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +# should return 0 and 1 (10 reversed) +SELECT * FROM t1; +a +0 +1 +DROP TABLE t1; End of 5.1 tests |