diff options
author | unknown <igor@rurik.mysql.com> | 2003-07-16 13:35:34 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2003-07-16 13:35:34 -0700 |
commit | 5742bdf60979d6b1d56a86fd27df556dcd4b1bf3 (patch) | |
tree | 7cda3f32b4df3b70ba418601d183b2f3265e1fff /sql/sql_lex.cc | |
parent | 176d336404e1a29ff1b61ffb690d2132187e4d88 (diff) | |
parent | a41a43f99d053b96821d0c7388126ca581146933 (diff) | |
download | mariadb-git-5742bdf60979d6b1d56a86fd27df556dcd4b1bf3.tar.gz |
Conflict resolution
include/my_sys.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysqld.cc:
Manual merge
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 4cf13682f84..a4b4aa7f7b3 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -122,6 +122,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) lex->yacc_yyss=lex->yacc_yyvs=0; lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE); lex->sql_command=SQLCOM_END; + lex->duplicates= DUP_ERROR; return lex; } @@ -556,10 +557,12 @@ int yylex(void *arg, void *yythd) return(IDENT); case MY_LEX_IDENT_SEP: // Found ident and now '.' - lex->next_state=MY_LEX_IDENT_START;// Next is an ident (not a keyword) yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; c=yyGet(); // should be '.' + lex->next_state= MY_LEX_IDENT_START;// Next is an ident (not a keyword) + if (!ident_map[yyPeek()]) // Probably ` or " + lex->next_state= MY_LEX_START; return((int) c); case MY_LEX_NUMBER_IDENT: // number or ident which num-start @@ -600,7 +603,7 @@ int yylex(void *arg, void *yythd) yyUnget(); } // fall through - case MY_LEX_IDENT_START: // Incomplete ident + case MY_LEX_IDENT_START: // We come here after '.' #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(cs)) { @@ -688,6 +691,7 @@ int yylex(void *arg, void *yythd) } if (c == delim) yySkip(); // Skip end ` + lex->next_state= MY_LEX_START; return(IDENT); } case MY_LEX_SIGNED_NUMBER: // Incomplete signed number @@ -706,9 +710,9 @@ int yylex(void *arg, void *yythd) if (c != '.') { if (c == '-' && my_isspace(cs,yyPeek())) - state=MY_LEX_COMMENT; + state= MY_LEX_COMMENT; else - state = MY_LEX_CHAR; // Return sign as single char + state= MY_LEX_CHAR; // Return sign as single char break; } yyUnget(); // Fix for next loop @@ -867,7 +871,7 @@ int yylex(void *arg, void *yythd) else state=MY_LEX_CHAR; // Return '*' break; - case MY_LEX_SET_VAR: // Check if ':=' + case MY_LEX_SET_VAR: // Check if ':=' if (yyPeek() != '=') { state=MY_LEX_CHAR; // Return ':' @@ -903,8 +907,8 @@ int yylex(void *arg, void *yythd) state = MY_LEX_REAL; // Real else { - state = MY_LEX_CHAR; // return '.' - lex->next_state=MY_LEX_IDENT_START;// Next is an ident (not a keyword) + state= MY_LEX_IDENT_SEP; // return '.' + yyUnget(); // Put back '.' } break; case MY_LEX_USER_END: // end '@' of user@hostname @@ -932,8 +936,11 @@ int yylex(void *arg, void *yythd) case MY_LEX_SYSTEM_VAR: yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; - lex->next_state=MY_LEX_IDENT_OR_KEYWORD; yySkip(); // Skip '@' + lex->next_state= (state_map[yyPeek()] == + MY_LEX_USER_VARIABLE_DELIMITER ? + MY_LEX_OPERATOR_OR_IDENT : + MY_LEX_IDENT_OR_KEYWORD); return((int) '@'); case MY_LEX_IDENT_OR_KEYWORD: /* @@ -941,7 +948,6 @@ int yylex(void *arg, void *yythd) We should now be able to handle: [(global | local | session) .]variable_name */ - while (ident_map[c=yyGet()]) ; if (c == '.') lex->next_state=MY_LEX_IDENT_SEP; @@ -965,7 +971,7 @@ void st_select_lex_node::init_query() { options= 0; linkage= UNSPECIFIED_TYPE; - no_table_names_allowed= uncacheable= dependent= 0; + no_error= no_table_names_allowed= uncacheable= dependent= 0; ref_pointer_array= 0; cond_count= 0; } |