diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-03-05 12:07:43 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-03-07 14:35:01 +0400 |
commit | a71d185a9a84c4c5f5d251e43aaaaf6efa0aa8d9 (patch) | |
tree | 5a2168a063bdb21a47ad9e73dc67c31897fe20cb /sql/sql_lex.h | |
parent | aa4b2c15093312784ab3e21493d3093fd5bddbb1 (diff) | |
download | mariadb-git-a71d185a9a84c4c5f5d251e43aaaaf6efa0aa8d9.tar.gz |
MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW
Part#1: moving opt_if_not_exists from "sf_tail" and "sp_tail" to "create".
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index ca72770e13b..70272e83e08 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3737,16 +3737,10 @@ public: sp_head *make_sp_head(THD *thd, const sp_name *name, const Sp_handler *sph); sp_head *make_sp_head_no_recursive(THD *thd, const sp_name *name, const Sp_handler *sph); - sp_head *make_sp_head_no_recursive(THD *thd, - DDL_options_st options, sp_name *name, - const Sp_handler *sph) - { - if (add_create_options_with_check(options)) - return NULL; - return make_sp_head_no_recursive(thd, name, sph); - } bool sp_body_finalize_function(THD *); bool sp_body_finalize_procedure(THD *); + bool sp_body_finalize_function_standalone(THD *, const sp_name *end_name); + bool sp_body_finalize_procedure_standalone(THD *, const sp_name *end_name); sp_package *create_package_start(THD *thd, enum_sql_command command, const Sp_handler *sph, @@ -4486,6 +4480,28 @@ public: void stmt_purge_to(const LEX_CSTRING &to); bool stmt_purge_before(Item *item); + +private: + bool stmt_create_routine_start(const DDL_options_st &options) + { + create_info.set(options); + return main_select_push() || check_create_options(options); + } +public: + bool stmt_create_function_start(const DDL_options_st &options) + { + sql_command= SQLCOM_CREATE_SPFUNCTION; + return stmt_create_routine_start(options); + } + bool stmt_create_procedure_start(const DDL_options_st &options) + { + sql_command= SQLCOM_CREATE_PROCEDURE; + return stmt_create_routine_start(options); + } + void stmt_create_routine_finalize() + { + pop_select(); // main select + } }; |