Commit 86775b10 authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg

Bug#37114: sql_mode NO_BACKSLASH_ESCAPES does not work properly with LOAD DATA...

Bug#37114: sql_mode NO_BACKSLASH_ESCAPES does not work properly with LOAD DATA      Bug#37114: sql_mode NO_BACKSLASH_ESCAPES does not work properly with LOAD DATA INFILE

tweaked test to make embedded server happy
parent d9e0a4b7
...@@ -334,9 +334,11 @@ SET SESSION character_set_server=latin1; ...@@ -334,9 +334,11 @@ SET SESSION character_set_server=latin1;
SET SESSION character_set_connection=latin1; SET SESSION character_set_connection=latin1;
SET @OLD_SQL_MODE=@@SESSION.SQL_MODE; SET @OLD_SQL_MODE=@@SESSION.SQL_MODE;
test LOAD DATA INFILE test LOAD DATA INFILE
SET sql_mode = '';
SELECT '1 \\aa\n' INTO DUMPFILE 'MYSQLTEST_VARDIR/tmp/bug37114.txt';
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
SET sql_mode = 'NO_BACKSLASH_ESCAPES'; SET sql_mode = 'NO_BACKSLASH_ESCAPES';
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/bug37114.txt' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ' '; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug37114.txt' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ' ';
SELECT * FROM t1; SELECT * FROM t1;
id val1 id val1
1 \aa 1 \aa
......
...@@ -357,16 +357,17 @@ SET @OLD_SQL_MODE=@@SESSION.SQL_MODE; ...@@ -357,16 +357,17 @@ SET @OLD_SQL_MODE=@@SESSION.SQL_MODE;
--let $file=$MYSQLTEST_VARDIR/tmp/bug37114.txt --let $file=$MYSQLTEST_VARDIR/tmp/bug37114.txt
--let $file2=$MYSQLTEST_VARDIR/tmp/bug37114_out.txt --let $file2=$MYSQLTEST_VARDIR/tmp/bug37114_out.txt
--write_file $file SET sql_mode = '';
1 \aa
EOF --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
SET sql_mode = 'NO_BACKSLASH_ESCAPES'; SET sql_mode = 'NO_BACKSLASH_ESCAPES';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA LOCAL INFILE '$file' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ' ' --eval LOAD DATA INFILE '$file' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ' '
SELECT * FROM t1; SELECT * FROM t1;
# show we can write this with OUTFILE, forcing the parameters for now # show we can write this with OUTFILE, forcing the parameters for now
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment