mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#20432: mysql client interprets commands in comments
do not look for client-specific commands while inside a multi-line comment. we will allow multi-comments pretty much anywhere within SQL-statements, but client-specific commands (help, use, print, ...) must be the first token in the input. client/mysql.cc: Bug#20432: mysql client interprets commands in comments mysql-test/r/mysql_client.result: Bug#20432: mysql client interprets commands in comments test client-side parsing of comments and client-specific commands mysql-test/t/mysql_client.test: Bug#20432: mysql client interprets commands in comments test client-side parsing of comments and client-specific commands
This commit is contained in:
@@ -1052,7 +1052,7 @@ static int read_lines(bool execute_commands)
|
||||
(We want to allow help, print and clear anywhere at line start
|
||||
*/
|
||||
if (execute_commands && (named_cmds || glob_buffer.is_empty())
|
||||
&& !in_string && (com=find_command(line,0)))
|
||||
&& !ml_comment && !in_string && (com=find_command(line,0)))
|
||||
{
|
||||
if ((*com->func)(&glob_buffer,line) > 0)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user