Skip to content

Commit 692a44b

Browse files
committed
MDEV-23327: followup
fix an error with locked taböes
1 parent 1066312 commit 692a44b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sql/sql_udf.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,12 @@ enum drop_udf_result mysql_drop_function(THD *thd, const LEX_STRING *udf_name)
654654
udf_func *udf;
655655
DBUG_ENTER("mysql_drop_function");
656656

657+
if (thd->locked_tables_mode)
658+
{
659+
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
660+
DBUG_RETURN(UDF_DEL_RESULT_ERROR);
661+
}
662+
657663
if (!(table= open_udf_func_table(thd)))
658664
DBUG_RETURN(UDF_DEL_RESULT_ERROR);
659665

0 commit comments

Comments
 (0)