summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc28
1 files changed, 23 insertions, 5 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 08ad0245fb4..58bce754773 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1306,7 +1306,7 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
{
Lex_input_stream *lip= & thd->m_parser_state->m_lip;
int token;
-
+
if (lip->lookahead_token >= 0)
{
/*
@@ -1349,6 +1349,25 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
return WITH;
}
break;
+ case VALUES:
+ if (thd->lex->current_select->parsing_place == IN_UPDATE_ON_DUP_KEY
+ // || thd->lex->current_select->parsing_place == IN_PARTITIONING
+ )
+ return VALUE_SYM;
+ token= lex_one_token(yylval, thd);
+ lip->add_digest_token(token, yylval);
+ switch(token) {
+ case LESS_SYM:
+ return VALUES_LESS_SYM;
+ case IN_SYM:
+ return VALUES_IN_SYM;
+ default:
+ lip->lookahead_yylval= lip->yylval;
+ lip->yylval= NULL;
+ lip->lookahead_token= token;
+ return VALUES;
+ }
+ break;
default:
break;
}
@@ -2225,6 +2244,7 @@ void st_select_lex::init_query()
window_specs.empty();
window_funcs.empty();
tvc= 0;
+ in_tvc= false;
}
void st_select_lex::init_select()
@@ -2266,6 +2286,7 @@ void st_select_lex::init_select()
tvc= 0;
in_funcs.empty();
curr_tvc_name= 0;
+ in_tvc= false;
}
/*
@@ -2810,10 +2831,7 @@ void st_select_lex_unit::print(String *str, enum_query_type query_type)
}
if (sl->braces)
str->append('(');
- if (sl->tvc)
- sl->tvc->print(thd, str, query_type);
- else
- sl->print(thd, str, query_type);
+ sl->print(thd, str, query_type);
if (sl->braces)
str->append(')');
}