summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernt M. Johnsen <bernt.johnsen@sun.com>2009-03-02 14:26:57 +0100
committerBernt M. Johnsen <bernt.johnsen@sun.com>2009-03-02 14:26:57 +0100
commit82c21e46f6a263bf999b490f902629d6f0c0c7e0 (patch)
treebf4a0218fa3cad9cc4c5a7f1e90e9a971980a85f
parenta2231e59c538bab6130c99f34badf63a5e726a1e (diff)
parentef165e36d9a9397dad36a23250456f578d88e1d9 (diff)
downloadmariadb-git-82c21e46f6a263bf999b490f902629d6f0c0c7e0.tar.gz
Merged from gca branch (bug 42711)
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/t/mysql.test56
-rw-r--r--mysql-test/t/mysqldump-compat.test8
-rw-r--r--mysql-test/t/mysqltest.test2
-rw-r--r--mysql-test/t/show_check.test9
5 files changed, 47 insertions, 30 deletions
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index ad3138e80ea..15f28fb9610 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -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;
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 594d10e46a5..12431e26596 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -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
diff --git a/mysql-test/t/mysqldump-compat.test b/mysql-test/t/mysqldump-compat.test
index 848d66cc728..9a830b16f26 100644
--- a/mysql-test/t/mysqldump-compat.test
+++ b/mysql-test/t/mysqldump-compat.test
@@ -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
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 93528f81449..d087d38560b 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -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;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index f4e0b906f60..2d261aa0675 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -794,10 +794,12 @@ CREATE TABLE t1(колонка1 INT);
# 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.