Skip to content

Commit 804b00e

Browse files
author
Alexander Barkov
committed
An sql_yacc.yy clean-up
- Moving opt_union_order_or_limit inside union_opt, as it's not used in other places any more. - Changing union_opt to have no type. Earlier (before all MDEV-8909 dependency tasks) it had the <num> type, and it's return value was used to generate errors. Now union_opt does not need a return value because the grammar disallows ORDER and LIMIT clauses in wrong context.
1 parent c80c3f6 commit 804b00e

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

sql/sql_yacc.yy

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
17831783
udf_type opt_local opt_no_write_to_binlog
17841784
opt_temporary all_or_any opt_distinct
17851785
opt_ignore_leaves fulltext_options union_option
1786-
opt_not opt_union_order_or_limit
1787-
union_opt select_derived_init transaction_access_mode_types
1786+
opt_not
1787+
select_derived_init transaction_access_mode_types
17881788
opt_natural_language_mode opt_query_expansion
17891789
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
17901790
ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_sql_stmt
@@ -16434,15 +16434,11 @@ union_list_view:
1643416434
;
1643516435

1643616436
union_opt:
16437-
opt_union_order_or_limit
16438-
| union_list { $$= 1; }
16437+
/* Empty */
16438+
| union_order_or_limit
16439+
| union_list
1643916440
;
1644016441

16441-
opt_union_order_or_limit:
16442-
/* Empty */ { $$= 0; }
16443-
| union_order_or_limit { $$= 1; }
16444-
;
16445-
1644616442
union_order_or_limit:
1644716443
{
1644816444
LEX *lex= thd->lex;

0 commit comments

Comments
 (0)