From 29b11cffb5d53ce77c5e59649da25ae89d655d8f Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 13 Nov 2019 13:16:46 +0400 Subject: [PATCH] MDEV-21043 Collect different bison %type declarations into a single chunk --- sql/sql_yacc.yy | 23 ++++++++++------ sql/sql_yacc_ora.yy | 67 +++++++++++++++++++++++++-------------------- 2 files changed, 53 insertions(+), 37 deletions(-) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 5d56c885189..ad28eac306f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1258,9 +1258,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); opt_constraint constraint opt_ident sp_block_label opt_place opt_db -%type - sp_label - %type IDENT_sys ident @@ -1609,7 +1606,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa opt_field_or_var_spec fields_or_vars opt_load_data_set_spec view_list_opt view_list view_select - trigger_tail sp_tail event_tail + trigger_tail event_tail install uninstall partition_entry binlog_base64_event normal_key_options normal_key_opts all_key_opt spatial_key_options fulltext_key_options normal_key_opt @@ -1632,11 +1629,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt %type sp_proc_stmt_statement sp_proc_stmt_return - sp_proc_stmt_in_returns_clause %type sp_proc_stmt_compound_ok %type sp_proc_stmt_if %type sp_labeled_control sp_unlabeled_control -%type sp_labeled_block sp_unlabeled_block sp_unlabeled_block_not_atomic +%type sp_labeled_block sp_unlabeled_block %type sp_proc_stmt_continue_oracle %type sp_proc_stmt_exit_oracle %type sp_proc_stmt_leave @@ -1656,8 +1652,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type sp_decl_idents sp_decl_idents_init_vars %type sp_handler_type sp_hcond_list %type sp_cond sp_hcond sqlstate signal_value opt_signal_value -%type sp_decl_handler -%type sp_decls sp_decl sp_decl_body sp_decl_variable_list %type sp_name %type sp_param_name sp_param_name_and_type %type sp_for_loop_index_and_bounds @@ -1708,6 +1702,19 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type opt_history_unit %type history_point %type with_or_without_system + +/* Start of sql_mode=DEFAULT specific declarations */ +%type sp_tail +%type sp_unlabeled_block_not_atomic +%type sp_proc_stmt_in_returns_clause +%type sp_label +%type sp_decl_handler +%type sp_decls +%type sp_decl +%type sp_decl_body +%type sp_decl_variable_list +/* End of sql_mode=DEFAULT specific declarations */ + %% diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index 4ea4fd464fb..c98c0f3bc00 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -1233,13 +1233,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); key_cache_name sp_opt_label BIN_NUM TEXT_STRING_filesystem opt_constraint constraint opt_ident - opt_package_routine_end_name sp_block_label opt_place opt_db -%type - label_declaration_oracle - labels_declaration_oracle - %type IDENT_sys ident @@ -1248,7 +1243,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); ident_or_empty ident_table_alias ident_sysvar_name - ident_directly_assignable %type TEXT_STRING @@ -1264,7 +1258,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); IDENT_cli ident_cli ident_cli_set_usual_case - ident_cli_directly_assignable %type keyword_data_type @@ -1282,7 +1275,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); keyword_sysvar_type keyword_table_alias keyword_verb_clause - keyword_directly_assignable charset reserved_keyword_udt non_reserved_keyword_udt @@ -1295,7 +1287,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); optionally_qualified_column_ident %type - remember_name remember_end remember_end_opt + remember_name remember_end remember_tok_start wild_and_where @@ -1610,8 +1602,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); opt_lock_wait_timeout opt_delete_gtid_domain asrow_attribute - set_assign - sp_tail_standalone opt_constraint_no_id %type call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt @@ -1620,7 +1610,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type sp_proc_stmt_if %type sp_labeled_control sp_unlabeled_control %type sp_labeled_block sp_unlabeled_block -%type sp_labelable_stmt %type sp_proc_stmt_continue_oracle %type sp_proc_stmt_exit_oracle %type sp_proc_stmt_leave @@ -1640,23 +1629,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type sp_decl_idents sp_decl_idents_init_vars %type sp_handler_type sp_hcond_list %type sp_cond sp_hcond sqlstate signal_value opt_signal_value -%type sp_decl_body_list opt_sp_decl_body_list -%type sp_decl_vars -%type sp_decl_non_handler sp_decl_non_handler_list -%type sp_decl_handler sp_decl_handler_list opt_sp_decl_handler_list -%type package_implementation_routine_definition -%type package_implementation_item_declaration -%type package_implementation_declare_section -%type package_implementation_declare_section_list1 -%type package_implementation_declare_section_list2 -%type sp_block_statements_and_exceptions -%type package_implementation_executable_section -%type sp_instr_addr -%type opt_exception_clause exception_handlers -%type remember_lex package_routine_lex - package_specification_function - package_specification_procedure -%type sp_name opt_sp_name +%type sp_name %type sp_param_name sp_param_name_and_type %type sp_for_loop_index_and_bounds %type sp_for_loop_bounds @@ -1706,6 +1679,42 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type opt_history_unit %type history_point %type with_or_without_system + +/* Start of sql_mode=ORACLE specific declarations */ +%type set_assign +%type sp_tail_standalone +%type sp_labelable_stmt +%type remember_end_opt +%type opt_package_routine_end_name +%type label_declaration_oracle +%type labels_declaration_oracle +%type keyword_directly_assignable +%type ident_directly_assignable +%type ident_cli_directly_assignable +%type opt_sp_name +%type sp_decl_body_list +%type opt_sp_decl_body_list +%type sp_decl_vars +%type sp_decl_non_handler +%type sp_decl_non_handler_list +%type sp_decl_handler +%type sp_decl_handler_list +%type opt_sp_decl_handler_list +%type package_implementation_routine_definition +%type package_implementation_item_declaration +%type package_implementation_declare_section +%type package_implementation_declare_section_list1 +%type package_implementation_declare_section_list2 +%type sp_block_statements_and_exceptions +%type package_implementation_executable_section +%type sp_instr_addr +%type opt_exception_clause exception_handlers +%type remember_lex +%type package_routine_lex +%type package_specification_function +%type package_specification_procedure +/* End of sql_mode=ORACLE specific declarations */ + %%