Commit 82c21e46 authored by Bernt M. Johnsen's avatar Bernt M. Johnsen

Merged from gca branch (bug 42711)

parents a2231e59 ef165e36
......@@ -1094,7 +1094,7 @@ CREATE DATABASE mysqltest1;
use mysqltest1;
CREATE TABLE t1(1 INT);
---> Dumping mysqltest1 to show_check.mysqltest1.sql
---> Dumping mysqltest1 to outfile1
DROP DATABASE mysqltest1;
......
......@@ -98,35 +98,43 @@ drop table t1;
# Bug #20432: mysql client interprets commands in comments
#
--let $file = $MYSQLTEST_VARDIR/tmp/bug20432.sql
# if the client sees the 'use' within the comment, we haven't fixed
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
--exec echo "/*" > $file
--exec echo "use" >> $file
--exec echo "*/" >> $file
--exec $MYSQL < $file 2>&1
# SQL can have embedded comments => workie
--exec echo "select /*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ 1" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
--exec echo "select /*" > $file
--exec echo "use" >> $file
--exec echo "*/ 1" >> $file
--exec $MYSQL < $file 2>&1
# client commands on the other hand must be at BOL => error
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "xxx" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "/*" > $file
--exec echo "xxx" >> $file
--exec echo "*/ use" >> $file
--error 1
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
--exec $MYSQL < $file 2>&1
# client comment recognized, but parameter missing => error
--exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
--exec echo "use" > $file
--exec $MYSQL < $file 2>&1
--remove_file $file
#
# Bug #20328: mysql client interprets commands in comments
#
--exec $MYSQL -e "help" > $MYSQLTEST_VARDIR/tmp/bug20328_1.result
--exec $MYSQL -e "help " > $MYSQLTEST_VARDIR/tmp/bug20328_2.result
--diff_files $MYSQLTEST_VARDIR/tmp/bug20328_1.result $MYSQLTEST_VARDIR/tmp/bug20328_2.result
--let $file1 = $MYSQLTEST_VARDIR/tmp/bug20328_1.result
--let $file2 = $MYSQLTEST_VARDIR/tmp/bug20328_2.result
--exec $MYSQL -e "help" > $file1
--exec $MYSQL -e "help " > $file2
--diff_files $file1 $file2
--remove_file $file1
--remove_file $file2
#
# Bug #19216: Client crashes on long SELECT
......@@ -152,13 +160,15 @@ EOF
#
# Bug #20103: Escaping with backslash does not work
#
--exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql
--exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
--let $file = $MYSQLTEST_VARDIR/tmp/bug20103.sql
--exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';" > $file
--exec echo "SELECT '\';" >> $file
--exec $MYSQL < $file 2>&1
--exec echo "SET SQL_MODE = '';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql
--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
--exec echo "SET SQL_MODE = '';" > $file
--exec echo "SELECT '\';';" >> $file
--exec $MYSQL < $file 2>&1
--remove_file $file
#
# Bug#17583: mysql drops connection when stdout is not writable
......
......@@ -5,9 +5,13 @@
# Bug #30126: semicolon before closing */ in /*!... CREATE DATABASE ;*/
#
--let $file = $MYSQLTEST_VARDIR/tmp/bug30126.sql
CREATE DATABASE mysqldump_30126;
USE mysqldump_30126;
CREATE TABLE t1 (c1 int);
--exec $MYSQL_DUMP --add-drop-database mysqldump_30126 > $MYSQLTEST_VARDIR/tmp/bug30126.sql
--exec $MYSQL mysqldump_30126 < $MYSQLTEST_VARDIR/tmp/bug30126.sql
--exec $MYSQL_DUMP --add-drop-database mysqldump_30126 > $file
--exec $MYSQL mysqldump_30126 < $file
DROP DATABASE mysqldump_30126;
--remove_file $file
......@@ -1459,7 +1459,7 @@ select "this will be executed";
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
--error 0,1
remove_file $MYSQLTEST_VARDIR/log/zero_length_file.reject;
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.reject;
--error 0,1
remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;
......
......@@ -794,10 +794,12 @@ CREATE TABLE t1(
# Check:
# - Dump mysqltest1;
--let $outfile1=$MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
--echo
--echo ---> Dumping mysqltest1 to show_check.mysqltest1.sql
--echo ---> Dumping mysqltest1 to outfile1
--exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
--exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $outfile1
# - Clean mysqltest1;
......@@ -812,7 +814,8 @@ DROP DATABASE mysqltest1;
--echo
--echo ---> Restoring mysqltest1...
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/show_check.mysqltest1.sql
--exec $MYSQL test < $outfile1
--remove_file $outfile1
# - Check definition of the table.
......
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