summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2008-06-24 19:32:06 +0500
committerGleb Shchepa <gshchepa@mysql.com>2008-06-24 19:32:06 +0500
commit7ad63a7202dbeba44d7e646b94fc9d98a915e1e4 (patch)
tree2c3627f00a3b2c68aab68c9a06faf55695b2dca7 /client
parent9b6a012ce53091525a6d3276855920afec208603 (diff)
downloadmariadb-git-7ad63a7202dbeba44d7e646b94fc9d98a915e1e4.tar.gz
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)
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index a4706a1c580..5348941b92f 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2156,7 +2156,14 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
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)