diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
commit | fd132be117e44318de04973e8bc825651b220792 (patch) | |
tree | a78222eeae060b5a605633a9f603e5e7528f12c3 /sql/sql_yacc.yy | |
parent | 7b05fc5cdd6058e91a26836ace54f45f37fa88b5 (diff) | |
parent | a917be3e7f07fc803fb04aba7173081550dcc7db (diff) | |
download | mariadb-git-fd132be117e44318de04973e8bc825651b220792.tar.gz |
Merge branch '10.6' into 10.7
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 116c2b7fe1d..f4f6aca59b8 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -349,12 +349,11 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); */ %ifdef MARIADB -%expect 67 +%expect 71 %else -%expect 69 +%expect 72 %endif - /* Comments for TOKENS. For each token, please include in the same line a comment that contains @@ -382,6 +381,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); */ %token <NONE> ABORT_SYM /* INTERNAL (used in lex) */ %token <NONE> IMPOSSIBLE_ACTION /* To avoid warning for yyerrlab1 */ +%token <NONE> FORCE_LOOKAHEAD /* INTERNAL never returned by the lexer */ %token <NONE> END_OF_INPUT /* INTERNAL */ %token <kwd> COLON_ORACLE_SYM /* INTERNAL */ %token <kwd> PARAM_MARKER /* INTERNAL */ @@ -395,7 +395,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %token <NONE> WITH_ROLLUP_SYM /* INTERNAL */ %token <NONE> WITH_SYSTEM_SYM /* INTERNAL */ - /* Identifiers */ @@ -2701,6 +2700,9 @@ sequence_def: } ; +/* this rule is used to force look-ahead in the parser */ +force_lookahead: {} | FORCE_LOOKAHEAD {} ; + server_def: SERVER_SYM opt_if_not_exists ident_or_text { @@ -2902,7 +2904,7 @@ ev_sql_stmt: lex->sphead->set_body_start(thd, lip->get_cpp_ptr()); } - sp_proc_stmt + sp_proc_stmt force_lookahead { /* return back to the original memory root ASAP */ if (Lex->sp_body_finalize_event(thd)) @@ -12952,6 +12954,7 @@ insert_start: { if (Lex->main_select_push()) MYSQL_YYABORT; mysql_init_select(Lex); + Lex->inc_select_stack_outer_barrier(); Lex->current_select->parsing_place= BEFORE_OPT_LIST; } ; @@ -17744,8 +17747,8 @@ trigger_tail: lex->sphead->set_body_start(thd, lip->get_cpp_tok_start()); } - sp_proc_stmt /* $19 */ - { /* $20 */ + sp_proc_stmt /* $19 */ force_lookahead /* $20 */ + { /* $21 */ LEX *lex= Lex; lex->sql_command= SQLCOM_CREATE_TRIGGER; @@ -17786,7 +17789,6 @@ sf_return_type: } ; - /*************************************************************************/ xa: @@ -18106,7 +18108,7 @@ sf_c_chistics_and_body_standalone: lex->sphead->set_c_chistics(lex->sp_chistics); lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start()); } - sp_proc_stmt_in_returns_clause + sp_proc_stmt_in_returns_clause force_lookahead { if (unlikely(Lex->sp_body_finalize_function(thd))) MYSQL_YYABORT; @@ -18127,7 +18129,7 @@ sp_tail_standalone: Lex->sphead->set_c_chistics(Lex->sp_chistics); Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start()); } - sp_proc_stmt + sp_proc_stmt force_lookahead { if (unlikely(Lex->sp_body_finalize_procedure(thd))) MYSQL_YYABORT; @@ -18996,8 +18998,7 @@ sf_c_chistics_and_body_standalone: lex->sphead->set_c_chistics(lex->sp_chistics); lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start()); } - sp_tail_is - sp_body + sp_tail_is sp_body force_lookahead { if (unlikely(Lex->sp_body_finalize_function(thd))) MYSQL_YYABORT; |