summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-05 12:07:43 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-07 14:35:01 +0400
commita71d185a9a84c4c5f5d251e43aaaaf6efa0aa8d9 (patch)
tree5a2168a063bdb21a47ad9e73dc67c31897fe20cb /sql/sql_lex.cc
parentaa4b2c15093312784ab3e21493d3093fd5bddbb1 (diff)
downloadmariadb-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.cc')
-rw-r--r--sql/sql_lex.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 792a196c5a8..aaa34d29c70 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -6532,6 +6532,14 @@ bool LEX::sp_body_finalize_procedure(THD *thd)
}
+bool LEX::sp_body_finalize_procedure_standalone(THD *thd,
+ const sp_name *end_name)
+{
+ return sp_body_finalize_procedure(thd) ||
+ sphead->check_standalone_routine_end_name(end_name);
+}
+
+
bool LEX::sp_body_finalize_function(THD *thd)
{
if (sphead->is_not_allowed_in_function("function"))
@@ -6548,6 +6556,14 @@ bool LEX::sp_body_finalize_function(THD *thd)
}
+bool LEX::sp_body_finalize_function_standalone(THD *thd,
+ const sp_name *end_name)
+{
+ return sp_body_finalize_function(thd) ||
+ sphead->check_standalone_routine_end_name(end_name);
+}
+
+
bool LEX::sp_block_with_exceptions_finalize_declarations(THD *thd)
{
/*