diff options
author | ingo@mysql.com <> | 2004-09-14 13:49:08 +0200 |
---|---|---|
committer | ingo@mysql.com <> | 2004-09-14 13:49:08 +0200 |
commit | ce8db2bfb79acb058fd94261138cf66aeeb9b50d (patch) | |
tree | 86a33cde82dfc9f51099cdf06db8f3121e81da25 /sql/sql_lex.cc | |
parent | ad12db7678874ff40d0dcdff8cb586e3625a8162 (diff) | |
download | mariadb-git-ce8db2bfb79acb058fd94261138cf66aeeb9b50d.tar.gz |
BUG#5318 - failure: 'IGNORE_SPACE' affects numeric values after DEFAULT.
Added a check to recover from IGNORE_SPACE in this situation:
<ident-character(s)><space><dot><ident-character(s)>
The ignored space led to the false identification of the dot
as an ident separator (like "db.table").
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index fab047002ad..2fa169ce999 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -454,6 +454,7 @@ inline static uint int_token(const char *str,uint length) int yylex(void *arg, void *yythd) { reg1 uchar c; + bool space_ignored; int tokval, result_state; uint length; enum my_lex_states state; @@ -572,11 +573,12 @@ int yylex(void *arg, void *yythd) result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; } length= (uint) (lex->ptr - lex->tok_start)-1; + space_ignored= FALSE; if (lex->ignore_space) { - for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()); + for (; state_map[c] == MY_LEX_SKIP ; space_ignored= TRUE, c= yyGet()); } - if (c == '.' && ident_map[yyPeek()]) + if (! space_ignored && c == '.' && ident_map[yyPeek()]) lex->next_state=MY_LEX_IDENT_SEP; else { // '(' must follow directly if function |