From 1f89ea8ea049909228c441d125a2b13348ec56af Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 25 May 2016 18:36:51 +0400 Subject: [PATCH] sql_yacc.yy: Removing union_opt. Using /*empty*/, union_list, union_order_or_limit instead. This is to get rid of lex->current_select->braces easier (separately in union_list and in union_order_or_limit) --- sql/sql_yacc.yy | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ab66905ac5d..37a543aef53 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4945,7 +4945,10 @@ create_body: CREATE TABLE t1 (SELECT 1); */ | '(' create_select_query_specification ')' - { Select->set_braces(1);} union_opt {} + | '(' create_select_query_specification ')' + { Select->set_braces(1);} union_list {} + | '(' create_select_query_specification ')' + { Select->set_braces(1);} union_order_or_limit {} | create_like { @@ -4977,7 +4980,10 @@ create_select_query_expression_body: | SELECT_SYM create_select_part2 create_select_part3_union_not_ready create_select_part4 | '(' create_select_query_specification ')' - { Select->set_braces(1);} union_opt {} + | '(' create_select_query_specification ')' + { Select->set_braces(1);} union_list {} + | '(' create_select_query_specification ')' + { Select->set_braces(1);} union_order_or_limit {} ; opt_create_partitioning: @@ -8536,12 +8542,16 @@ select: select_init: SELECT_SYM select_options_and_item_list select_init3 - | '(' select_paren ')' union_opt + | '(' select_paren ')' + | '(' select_paren ')' union_list + | '(' select_paren ')' union_order_or_limit ; union_list_part2: SELECT_SYM select_options_and_item_list select_init3_union_query_term - | '(' select_paren_union_query_term ')' union_opt + | '(' select_paren_union_query_term ')' + | '(' select_paren_union_query_term ')' union_list + | '(' select_paren_union_query_term ')' union_order_or_limit ; select_paren: @@ -16433,12 +16443,6 @@ union_list_view: } ; -union_opt: - /* Empty */ - | union_order_or_limit - | union_list - ; - union_order_or_limit: { LEX *lex= thd->lex;