From 692a44b30928e9bfb8f7a1aaf450fc29fa97c4b8 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 20 Oct 2020 12:01:37 +0200 Subject: [PATCH] MDEV-23327: followup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix an error with locked taböes --- sql/sql_udf.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index b4e863709d5..2af12d94228 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -654,6 +654,12 @@ enum drop_udf_result mysql_drop_function(THD *thd, const LEX_STRING *udf_name) udf_func *udf; DBUG_ENTER("mysql_drop_function"); + if (thd->locked_tables_mode) + { + my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0)); + DBUG_RETURN(UDF_DEL_RESULT_ERROR); + } + if (!(table= open_udf_func_table(thd))) DBUG_RETURN(UDF_DEL_RESULT_ERROR);