#At file:///work/bzr/mysql-5.0-bugteam-36244/
2641 Gleb Shchepa 2008-06-24
Bug #36244: MySQL CLI doesn't recognize standalone --
as a commentary
mysql client has been modified to interpret EOL after
standalone -- commentary strings like whitespace
character (according to
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html)
modified:
client/mysql.cc
mysql-test/t/mysql_delimiter.sql
per-file messages:
mysql-test/t/mysql_delimiter.sql
Added test case for bug #36244.
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2008-03-28 18:02:27 +0000
+++ b/client/mysql.cc 2008-06-24 14:32:06 +0000
@@ -2156,7 +2156,14 @@ static bool add_line(String &buffer,char
}
else if (!*ml_comment && (!*in_string && (inchar == '#' ||
inchar == '-' && pos[1] == '-' &&
- my_isspace(charset_info,pos[2]))))
+ /*
+ The third byte is either whitespace or is the
+ end of the line -- which would occur only
+ because of the user sending newline -- which is
+ itself whitespace and should also match.
+ */
+ (my_isspace(charset_info,pos[2]) ||
+ !pos[2]))))
{
// Flush previously accepted characters
if (out != line)
=== modified file 'mysql-test/t/mysql_delimiter.sql'
--- a/mysql-test/t/mysql_delimiter.sql 2006-11-22 06:27:06 +0000
+++ b/mysql-test/t/mysql_delimiter.sql 2008-06-24 14:32:06 +0000
@@ -59,3 +59,10 @@ source t/mysql_delimiter_19799.sql
use test//
show tables//
delimiter ; # Reset delimiter
+
+#
+# Bug #36244: MySQL CLI doesn't recognize standalone -- as comment
+# before DELIMITER statement
+#
+--
+DELIMITER ;
| Thread |
|---|
| • bzr commit into mysql-5.0 branch (gshchepa:2641) Bug#36244 | Gleb Shchepa | 24 Jun |