mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
d278381ec8
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0 client/mysql.cc: Auto merged heap/hp_delete.c: Auto merged mysql-test/t/mysqlbinlog.test: Auto merged scripts/fill_func_tables.sh: Auto merged scripts/mysql_install_db.sh: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged mysql-test/r/grant2.result: Manual merge mysql-test/r/heap_btree.result: Manual merge mysql-test/r/mysql_client.result: Manual merge mysql-test/t/grant2.test: Manual merge mysql-test/t/heap_btree.test: Manual merge mysql-test/t/mysql_client.test: Manual merge
46 lines
1.9 KiB
Text
46 lines
1.9 KiB
Text
# This test should work in embedded server after we fix mysqltest
|
|
-- source include/not_embedded.inc
|
|
|
|
#
|
|
# Bug #20432: mysql client interprets commands in comments
|
|
#
|
|
|
|
# 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
|
|
|
|
# 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
|
|
|
|
# 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
|
|
--error 1
|
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 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
|
|
|
|
#
|
|
# Bug #20328: mysql client interprets commands in comments
|
|
#
|
|
--exec echo 'help' | $MYSQL
|
|
--exec echo 'help ' | $MYSQL
|
|
|
|
#
|
|
# 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
|
|
|
|
--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
|