From a53662555302f08dc7dfb89c6ad12863fbf4e8d7 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Wed, 1 Jul 2020 14:11:31 +0530 Subject: MDEV-22654: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status on FUNCTION replace When there is REPLACE in the statement, sp_drop_routine_internal() returns 0 (SP_OK) on success which is then assigned to ret. So ret becomes false and the error state is lost. The expression inside DBUG_ASSERT() evaluates to false and thus the assertion failure. --- sql/sp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sp.cc') diff --git a/sql/sp.cc b/sql/sp.cc index 1d340644ba1..b783ff3b583 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1080,7 +1080,7 @@ sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp) { if (lex->create_info.or_replace()) { - if ((ret= sp_drop_routine_internal(thd, type, lex->spname, table))) + if (sp_drop_routine_internal(thd, type, lex->spname, table)) goto done; } else if (lex->create_info.if_not_exists()) -- cgit v1.2.1