1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-23327: followup

fix an error with locked taböes
This commit is contained in:
Oleksandr Byelkin
2020-10-20 12:01:37 +02:00
parent 1066312a12
commit 692a44b309

View File

@ -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);