summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-12-11 12:26:03 -0500
committerChad MILLER <chad@mysql.com>2008-12-11 12:26:03 -0500
commitcf9126a034cd69b1271519b130d2218fd4d08a5a (patch)
tree3a6f45eb60eb44c5037ba8c027beb16f6091fa26 /mysql-test/t/mysql.test
parente419c5d349997835644f1b438e90a4af61694a62 (diff)
downloadmariadb-git-cf9126a034cd69b1271519b130d2218fd4d08a5a.tar.gz
Bug#33812: mysql client incorrectly parsing DELIMITER
Fix parsing of mysql client commands, especially in relation to single-line comments when --comments was specified. This is a little tricky, because we need to allow single-line comments in the middle of statements, but we don't want to allow client commands in the middle of statements. So in comment-preservation mode, we go ahead and send single-line comments to the server immediately when we encounter them on their own. This is still slightly flawed, in that it does not handle a single-line comment with leading spaces, followed by a client-side command when --comment has been enabled. But this isn't a new problem, and it is quite an edge condition. Fixing it would require a more extensive overall of how the mysql client parses commands.
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r--mysql-test/t/mysql.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 182b292c817..76941af893a 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -290,4 +290,23 @@ EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29323.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bug29323.sql;
+#
+# Bug #33812: mysql client incorrectly parsing DELIMITER
+#
+# The space and ; after delimiter are important
+--exec $MYSQL -e "select 1 delimiter ;"
+
+#
+# Bug #38158: mysql client regression, can't read dump files
+#
+--write_file $MYSQLTEST_VARDIR/tmp/bug38158.sql
+-- Testing
+--
+delimiter ||
+select 2 ||
+EOF
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1
+--exec $MYSQL -c < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1
+remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
+
--echo End of 5.0 tests