Commit 692a44b3 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-23327: followup

fix an error with locked taböes
parent 1066312a
...@@ -654,6 +654,12 @@ enum drop_udf_result mysql_drop_function(THD *thd, const LEX_STRING *udf_name) ...@@ -654,6 +654,12 @@ enum drop_udf_result mysql_drop_function(THD *thd, const LEX_STRING *udf_name)
udf_func *udf; udf_func *udf;
DBUG_ENTER("mysql_drop_function"); 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))) if (!(table= open_udf_func_table(thd)))
DBUG_RETURN(UDF_DEL_RESULT_ERROR); DBUG_RETURN(UDF_DEL_RESULT_ERROR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment