diff options
author | unknown <monty@mishka.local> | 2004-10-14 18:03:46 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2004-10-14 18:03:46 +0300 |
commit | 3307318917fb2995eaed4fa8530613cba08ea341 (patch) | |
tree | d6c50a4680a01729ce573d4c4f548366a8d2b530 /sql/sql_lex.cc | |
parent | 84ad2489ec5c57a9a22f935c18835c731b3745c1 (diff) | |
download | mariadb-git-3307318917fb2995eaed4fa8530613cba08ea341.tar.gz |
true,false -> TRUE, FALSE
Simple fixes/optimization of things discovered during review of new pushed code
include/my_sys.h:
Ensure that clear_alloc_root() interacts correctly with alloc_root_inited()
mysys/hash.c:
More comments
Simple optimization (merge identical code)
mysys/my_bitmap.c:
Change inline -> static inline
sql/examples/ha_archive.cc:
Fixed compiler warning
sql/ha_ndbcluster.cc:
true,false -> TRUE, FALSE
Change if (false) -> #ifdef NOT_USED
sql/ha_ndbcluster.h:
true,false -> TRUE, FALSE
sql/handler.cc:
More comments
Remove not needed initializations.
#ifdef not used code
sql/item_cmpfunc.h:
true,false -> TRUE, FALSE
sql/item_strfunc.cc:
Move local variables to function beginning
Remove wrong comments
sql/log_event.h:
true,false -> TRUE, FALSE
sql/sql_base.cc:
true,false -> TRUE, FALSE
More comments
sql/sql_help.cc:
true,false -> TRUE, FALSE
sql/sql_lex.cc:
Simple optimization of new code
sql/sql_parse.cc:
true,false -> TRUE, FALSE
sql/sql_prepare.cc:
true,false -> TRUE, FALSE
sql/sql_table.cc:
true,false -> TRUE, FALSE
sql/sql_yacc.yy:
true,false -> TRUE, FALSE
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3deecccb4e1..ce629516862 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -454,7 +454,6 @@ 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; @@ -537,6 +536,7 @@ int yylex(void *arg, void *yythd) /* Fall through */ case MY_LEX_IDENT_OR_BIN: // TODO: Add binary string handling case MY_LEX_IDENT: + uchar *start; #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(cs)) { @@ -573,12 +573,16 @@ 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; + start= lex->ptr; if (lex->ignore_space) { - for (; state_map[c] == MY_LEX_SKIP ; space_ignored= TRUE, c= yyGet()); + /* + If we find a space then this can't be an identifier. We notice this + below by checking start != lex->ptr. + */ + for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()); } - if (! space_ignored && c == '.' && ident_map[yyPeek()]) + if (start == lex->ptr && c == '.' && ident_map[yyPeek()]) lex->next_state=MY_LEX_IDENT_SEP; else { // '(' must follow directly if function |