Commit 71485e7c authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup sql_yacc: introduce opt_not rule, combine otherwise duplicate rules

parent c655609d
......@@ -1677,7 +1677,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
table_option opt_if_not_exists create_or_replace opt_no_write_to_binlog
opt_temporary all_or_any opt_distinct
opt_ignore_leaves fulltext_options spatial_type union_option
field_def
field_def opt_not
union_opt 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
......@@ -2627,16 +2627,11 @@ opt_ev_on_completion:
;
ev_on_completion:
ON COMPLETION_SYM PRESERVE_SYM
ON COMPLETION_SYM opt_not PRESERVE_SYM
{
Lex->event_parse_data->on_completion=
Event_parse_data::ON_COMPLETION_PRESERVE;
$$= 1;
}
| ON COMPLETION_SYM NOT_SYM PRESERVE_SYM
{
Lex->event_parse_data->on_completion=
Event_parse_data::ON_COMPLETION_DROP;
Lex->event_parse_data->on_completion= $3
? Event_parse_data::ON_COMPLETION_DROP
: Event_parse_data::ON_COMPLETION_PRESERVE;
$$= 1;
}
;
......@@ -2802,8 +2797,7 @@ sp_chistic:
/* Create characteristics */
sp_c_chistic:
sp_chistic { }
| DETERMINISTIC_SYM { Lex->sp_chistics.detistic= TRUE; }
| not DETERMINISTIC_SYM { Lex->sp_chistics.detistic= FALSE; }
| opt_not DETERMINISTIC_SYM { Lex->sp_chistics.detistic= ! $1; }
;
sp_suid:
......@@ -15628,6 +15622,10 @@ begin:
lex->start_transaction_opt= 0;
}
opt_work {}
opt_not:
/* nothing */ { $$= 0; }
| not { $$= 1; }
;
opt_work:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment