From 942e8c7d4108d30a91aceb809e7e725e2f98408f Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Wed, 9 Dec 2009 09:51:20 +0100 Subject: Backport of revno: 2617.69.40 A pre-requisite patch for Bug#30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". This patch changes the MDL API by introducing a namespace for lock keys: MDL_TABLE for tables and views and MDL_PROCEDURE for stored procedures and functions. The latter is needed for the fix for Bug#30977. --- sql/sql_trigger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_trigger.cc') diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index b8a4edaa963..f9d99b3c119 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1883,7 +1883,7 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db, In the future, only an exclusive metadata lock will be enough. */ #ifndef DBUG_OFF - if (thd->mdl_context.is_exclusive_lock_owner(0, db, old_table)) + if (thd->mdl_context.is_exclusive_lock_owner(MDL_TABLE, db, old_table)) safe_mutex_assert_owner(&LOCK_open); #endif -- cgit v1.2.1