Skip to content

Commit 45907be

Browse files
committed
cleanup sql_yacc.yy: remove duplicate code in opt_union rule
1 parent 71485e7 commit 45907be

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

sql/sql_yacc.yy

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,6 @@ static bool sp_create_assignment_instr(THD *thd, bool no_lookahead)
952952
List<Condition_information_item> *cond_info_list;
953953
DYNCALL_CREATE_DEF *dyncol_def;
954954
List<DYNCALL_CREATE_DEF> *dyncol_def_list;
955-
bool is_not_empty;
956955
}
957956

958957
%{
@@ -1677,7 +1676,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
16771676
table_option opt_if_not_exists create_or_replace opt_no_write_to_binlog
16781677
opt_temporary all_or_any opt_distinct
16791678
opt_ignore_leaves fulltext_options spatial_type union_option
1680-
field_def opt_not
1679+
field_def opt_not opt_union_order_or_limit
16811680
union_opt select_derived_init transaction_access_mode_types
16821681
opt_natural_language_mode opt_query_expansion
16831682
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
@@ -1911,10 +1910,7 @@ END_OF_INPUT
19111910
'-' '+' '*' '/' '%' '(' ')'
19121911
',' '!' '{' '}' '&' '|' AND_SYM OR_SYM OR_OR_SYM BETWEEN_SYM CASE_SYM
19131912
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
1914-
1915-
%type <is_not_empty> opt_union_order_or_limit
1916-
1917-
%type <NONE> ROLE_SYM
1913+
ROLE_SYM
19181914

19191915
%%
19201916

@@ -15728,14 +15724,13 @@ union_list:
1572815724
;
1572915725

1573015726
union_opt:
15731-
/* Empty */ { $$= 0; }
15727+
opt_union_order_or_limit
1573215728
| union_list { $$= 1; }
15733-
| union_order_or_limit { $$= 1; }
1573415729
;
1573515730

1573615731
opt_union_order_or_limit:
15737-
/* Empty */{ $$= false; }
15738-
| union_order_or_limit { $$= true; }
15732+
/* Empty */ { $$= 0; }
15733+
| union_order_or_limit { $$= 1; }
1573915734
;
1574015735

1574115736
union_order_or_limit:

0 commit comments

Comments
 (0)