1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Backport from trunk:

Bug#18396916 MAIN.OUTFILE_LOADDATA TEST FAILS ON ARM, AARCH64, PPC/PPC64
  
  The recorded results for the failing tests were wrong.
  They were introduced by the patch for
  Bug#30946 mysqldump silently ignores --default-character-set when used with --tab
  
  Correct results were returned for platforms where 'char' is implemented as unsigned.
  This was reported as 
  Bug#46895 Test "outfile_loaddata" fails (reproducible)
  Bug#11755168 46895: TEST "OUTFILE_LOADDATA" FAILS (REPRODUCIBLE)
  The patch for that bug fixed only parts of the problem,
  leaving the incorrect results in the .result file.
  
  Solution: use 'uchar' for field_terminator and line_terminator on all platforms.
  Also: remove some un-necessary casts, leaving the ones we actually need.
This commit is contained in:
Tor Didriksen
2014-04-23 17:01:35 +02:00
parent 3d73cd23d0
commit c76e29c884
3 changed files with 51 additions and 30 deletions

View File

@ -143,15 +143,16 @@ TRUNCATE t2;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ';
Warnings:
Warning 1638 Non-ASCII separator arguments are not fully supported
Warning 1265 Data truncated for column 'a' at row 1
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1265 Data truncated for column 'a' at row 2
Warning 1261 Row 2 doesn't contain data for all columns
Warning 1261 Row 2 doesn't contain data for all columns
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
a b c
1 NULL NULL
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
SELECT * FROM t1;
a b c
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
SELECT * FROM t2;
a b c
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ъ';
@ -181,7 +182,14 @@ Warning 1638 Non-ASCII separator arguments are not fully supported
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
a b c
1 ABC-АБВ DEF-ÂÃÄ
1 ABC-АБВ DEF-ÂÃÄÑŠ2
2 NULL NULL
SELECT * FROM t1;
a b c
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
SELECT * FROM t2;
a b c
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
# Default (binary) charset:
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FROM t1;

View File

@ -169,6 +169,8 @@ TRUNCATE t2;
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ'
--remove_file $file
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
SELECT * FROM t1;
SELECT * FROM t2;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ъ'
@ -191,6 +193,8 @@ TRUNCATE t2;
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ъ'
--remove_file $file
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
SELECT * FROM t1;
SELECT * FROM t2;
--echo # Default (binary) charset: