summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2009-02-24 15:06:28 +0200
committerGeorgi Kodinov <kgeorge@mysql.com>2009-02-24 15:06:28 +0200
commit13ec76b0ad13070babfe44b56fa4088e6d2dfce5 (patch)
tree4dfe81a1565d1d9d7fc393906b204b3d46836353 /mysql-test/t/mysql.test
parent5cf0d591eb0733fc24aaeafbf0c1989b8d668fe7 (diff)
downloadmariadb-git-13ec76b0ad13070babfe44b56fa4088e6d2dfce5.tar.gz
Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first command on the line. I this case an extra line feed was added to the glob buffer and this was causing subsequent attempts to enter this delimiter to fail. Fixed by not adding a new line to the glob buffer if the command being added is a DELIMITER
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r--mysql-test/t/mysql.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 68a01a309d4..594d10e46a5 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -314,4 +314,21 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
#
--exec $MYSQL -e "select @z:='1',@z=database()"
+
+#
+# Bug #31060: MySQL CLI parser bug 2
+#
+
+--write_file $MYSQLTEST_VARDIR/tmp/bug31060.sql
+;DELIMITER DELIMITER
+;
+SELECT 1DELIMITER
+DELIMITER ;
+SELECT 1;
+EOF
+
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug31060.sql 2>&1
+
+remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql;
+
--echo End of 5.0 tests