1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-12390 Wrong error line numbers reported with sql_mode=IGNORE_SPACE

This commit is contained in:
Alexander Barkov
2017-03-29 07:21:34 +04:00
parent 3f7455c030
commit c5520a37d6
3 changed files with 52 additions and 1 deletions

View File

@@ -1448,7 +1448,10 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
below by checking start != lex->ptr.
*/
for (; state_map[(uchar) c] == MY_LEX_SKIP ; c= lip->yyGet())
;
{
if (c == '\n')
lip->yylineno++;
}
}
if (start == lip->get_ptr() && c == '.' &&
ident_map[(uchar) lip->yyPeek()])