1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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)
This commit is contained in:
Gleb Shchepa
2008-06-24 19:32:06 +05:00
parent 9b6a012ce5
commit 7ad63a7202
2 changed files with 15 additions and 1 deletions

View File

@ -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)