1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Don't give warnings for empty statements with comments

This commit is contained in:
monty@hundin.mysql.fi
2002-02-14 15:04:14 +02:00
parent d76fcdc5e9
commit b21f2d084f
7 changed files with 24 additions and 5 deletions

View File

@@ -734,6 +734,7 @@ int yylex(void *arg)
return(TEXT_STRING);
case STATE_COMMENT: // Comment
lex->options|= OPTION_FOUND_COMMENT;
while ((c = yyGet()) != '\n' && c) ;
yyUnget(); // Safety against eof
state = STATE_START; // Try again
@@ -745,6 +746,7 @@ int yylex(void *arg)
break;
}
yySkip(); // Skip '*'
lex->options|= OPTION_FOUND_COMMENT;
if (yyPeek() == '!') // MySQL command in comment
{
ulong version=MYSQL_VERSION_ID;