summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-05-24 18:23:18 +0400
committerAlexander Barkov <bar@mariadb.org>2016-05-24 18:23:18 +0400
commit804b00e878dd14b0e50a646ac134c4a52259d41a (patch)
tree10f3fc7506938005bb0b94fd036ba96b6f8af9a7
parentc80c3f6759e456b88211f8e207648ee5d3964dac (diff)
downloadmariadb-git-804b00e878dd14b0e50a646ac134c4a52259d41a.tar.gz
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.
-rw-r--r--sql/sql_yacc.yy14
1 files changed, 5 insertions, 9 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index b116202d366..ab66905ac5d 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1783,8 +1783,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
udf_type opt_local opt_no_write_to_binlog
opt_temporary all_or_any opt_distinct
opt_ignore_leaves fulltext_options union_option
- opt_not opt_union_order_or_limit
- union_opt select_derived_init transaction_access_mode_types
+ opt_not
+ select_derived_init transaction_access_mode_types
opt_natural_language_mode opt_query_expansion
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_sql_stmt
@@ -16434,15 +16434,11 @@ union_list_view:
;
union_opt:
- opt_union_order_or_limit
- | union_list { $$= 1; }
+ /* Empty */
+ | union_order_or_limit
+ | union_list
;
-opt_union_order_or_limit:
- /* Empty */ { $$= 0; }
- | union_order_or_limit { $$= 1; }
- ;
-
union_order_or_limit:
{
LEX *lex= thd->lex;