diff options
author | antony@ltantony.mysql.com <> | 2005-05-08 00:13:35 +0100 |
---|---|---|
committer | antony@ltantony.mysql.com <> | 2005-05-08 00:13:35 +0100 |
commit | 7a56977a794749ffe8b6e45e3d7505b610237a7d (patch) | |
tree | 40a191267f9bc695daef3da56fbab5efbe7c5e5f /client | |
parent | 3dce5fa432f337b8ebf9e987312a0c6b5098bd0e (diff) | |
download | mariadb-git-7a56977a794749ffe8b6e45e3d7505b610237a7d.tar.gz |
Bug#6925
Comment/*COMMENT*/is not a separator
Ensure that whitespace is inserted after C-style comment if required.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index c3a3b3df6d4..e0ed85f2651 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1100,6 +1100,7 @@ static bool add_line(String &buffer,char *line,char *in_string, uchar inchar; char buff[80], *pos, *out; COMMANDS *com; + bool need_space= 0; if (!line[0] && buffer.is_empty()) return 0; @@ -1208,6 +1209,7 @@ static bool add_line(String &buffer,char *line,char *in_string, { pos++; *ml_comment= 0; + need_space= 1; } else { // Add found char to buffer @@ -1217,7 +1219,14 @@ static bool add_line(String &buffer,char *line,char *in_string, (inchar == '\'' || inchar == '"' || inchar == '`')) *in_string= (char) inchar; if (!*ml_comment) + { + if (need_space && !my_isspace(charset_info, (char)inchar)) + { + *out++= ' '; + need_space= 0; + } *out++= (char) inchar; + } } } if (out != line || !buffer.is_empty()) |