From bcc9473e95e6186e345e3032d5e8bea75b8abc93 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Thu, 10 Dec 2009 11:21:38 +0300 Subject: Backport of: ------------------------------------------------------------ revno: 2617.68.25 committer: Dmitry Lenev branch nick: mysql-next-bg-pre2-2 timestamp: Wed 2009-09-16 18:26:50 +0400 message: Follow-up for one of pre-requisite patches for fixing bug #30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". Made enum_mdl_namespace enum part of MDL_key class and removed MDL_ prefix from the names of enum members. In order to do the latter changed name of PROCEDURE symbol to PROCEDURE_SYM (otherwise macro which was automatically generated for this symbol conflicted with MDL_key::PROCEDURE enum member). --- sql/sql_trigger.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/sql_trigger.cc') diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 676875ecc75..08d0dacd8e8 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1888,7 +1888,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(MDL_TABLE, db, old_table)) + if (thd->mdl_context.is_exclusive_lock_owner(MDL_key::TABLE, db, old_table)) safe_mutex_assert_owner(&LOCK_open); #endif @@ -2057,7 +2057,7 @@ add_tables_and_routines_for_triggers(THD *thd, if (trigger) { - MDL_key key(MDL_TRIGGER, trigger->m_db.str, trigger->m_name.str); + MDL_key key(MDL_key::TRIGGER, trigger->m_db.str, trigger->m_name.str); if (sp_add_used_routine(prelocking_ctx, thd->stmt_arena, &key, table_list->belong_to_view)) -- cgit v1.2.1