Skip to content

Commit 1f89ea8

Browse files
author
Alexander Barkov
committed
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)
1 parent 971538f commit 1f89ea8

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

sql/sql_yacc.yy

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4945,7 +4945,10 @@ create_body:
49454945
CREATE TABLE t1 (SELECT 1);
49464946
*/
49474947
| '(' create_select_query_specification ')'
4948-
{ Select->set_braces(1);} union_opt {}
4948+
| '(' create_select_query_specification ')'
4949+
{ Select->set_braces(1);} union_list {}
4950+
| '(' create_select_query_specification ')'
4951+
{ Select->set_braces(1);} union_order_or_limit {}
49494952
| create_like
49504953
{
49514954

@@ -4977,7 +4980,10 @@ create_select_query_expression_body:
49774980
| SELECT_SYM create_select_part2 create_select_part3_union_not_ready
49784981
create_select_part4
49794982
| '(' create_select_query_specification ')'
4980-
{ Select->set_braces(1);} union_opt {}
4983+
| '(' create_select_query_specification ')'
4984+
{ Select->set_braces(1);} union_list {}
4985+
| '(' create_select_query_specification ')'
4986+
{ Select->set_braces(1);} union_order_or_limit {}
49814987
;
49824988

49834989
opt_create_partitioning:
@@ -8536,12 +8542,16 @@ select:
85368542

85378543
select_init:
85388544
SELECT_SYM select_options_and_item_list select_init3
8539-
| '(' select_paren ')' union_opt
8545+
| '(' select_paren ')'
8546+
| '(' select_paren ')' union_list
8547+
| '(' select_paren ')' union_order_or_limit
85408548
;
85418549

85428550
union_list_part2:
85438551
SELECT_SYM select_options_and_item_list select_init3_union_query_term
8544-
| '(' select_paren_union_query_term ')' union_opt
8552+
| '(' select_paren_union_query_term ')'
8553+
| '(' select_paren_union_query_term ')' union_list
8554+
| '(' select_paren_union_query_term ')' union_order_or_limit
85458555
;
85468556

85478557
select_paren:
@@ -16433,12 +16443,6 @@ union_list_view:
1643316443
}
1643416444
;
1643516445

16436-
union_opt:
16437-
/* Empty */
16438-
| union_order_or_limit
16439-
| union_list
16440-
;
16441-
1644216446
union_order_or_limit:
1644316447
{
1644416448
LEX *lex= thd->lex;

0 commit comments

Comments
 (0)