diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 320b43c8e5c..a18f57bf9cf 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -494,7 +494,6 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal, enum enum_tx_isolation tx_isolation; enum Cast_target cast_type; enum Item_udftype udf_type; - enum ha_choice choice; CHARSET_INFO *charset; thr_lock_type lock_type; interval_type interval, interval_time_st; @@ -1164,8 +1163,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type <ulonglong_number> ulonglong_num real_ulonglong_num size_number -%type <choice> choice - %type <p_elem_value> part_bit_expr @@ -1812,15 +1809,16 @@ server_option: ; event_tail: - EVENT_SYM opt_if_not_exists sp_name + remember_name EVENT_SYM opt_if_not_exists sp_name { THD *thd= YYTHD; LEX *lex=Lex; - lex->create_info.options= $2; + lex->stmt_definition_begin= $1; + lex->create_info.options= $3; if (!(lex->event_parse_data= Event_parse_data::new_instance(thd))) MYSQL_YYABORT; - lex->event_parse_data->identifier= $3; + lex->event_parse_data->identifier= $4; lex->event_parse_data->on_completion= Event_parse_data::ON_COMPLETION_DROP; @@ -3757,8 +3755,8 @@ partitioning: LEX_STRING partition_name={C_STRING_WITH_LEN("partition")}; if (!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN)) { - my_error(ER_FEATURE_DISABLED, MYF(0), - "partitioning", "--with-partition"); + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), + "--skip-partition"); MYSQL_YYABORT; } lex->part_info= new partition_info(); @@ -9066,11 +9064,6 @@ dec_num: | FLOAT_NUM ; -choice: - ulong_num { $$= $1 != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; } - | DEFAULT { $$= HA_CHOICE_UNDEF; } - ; - procedure_clause: /* empty */ | PROCEDURE ident /* Procedure name */ @@ -9083,7 +9076,8 @@ procedure_clause: MYSQL_YYABORT; } - if (&lex->select_lex != lex->current_select) + if (&lex->select_lex != lex->current_select || + lex->select_lex.get_table_list()->derived) { my_error(ER_WRONG_USAGE, MYF(0), "PROCEDURE", "subquery"); MYSQL_YYABORT; |