From f26f632b44dfe9a6cc239a10f8697ba0ba50675d 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_table.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ddb53dd3754..42d688542b5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4140,7 +4140,7 @@ bool mysql_create_table(THD *thd, const char *db, const char *table_name, if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE)) { - target_mdl_request.init(MDL_TABLE, db, table_name, MDL_EXCLUSIVE); + target_mdl_request.init(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE); if (thd->mdl_context.try_acquire_exclusive_lock(&target_mdl_request)) { result= TRUE; @@ -4361,7 +4361,8 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, uint key_length; key_length= create_table_def_key(thd, key, table_list, 0); - table_list->mdl_request.init(MDL_TABLE, table_list->db, table_list->table_name, + table_list->mdl_request.init(MDL_key::TABLE, + table_list->db, table_list->table_name, MDL_EXCLUSIVE); if (thd->mdl_context.acquire_exclusive_lock(&table_list->mdl_request)) DBUG_RETURN(0); @@ -5271,7 +5272,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, } else { - table->mdl_request.init(MDL_TABLE, db, table_name, MDL_EXCLUSIVE); + table->mdl_request.init(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE); if (thd->mdl_context.try_acquire_exclusive_lock(&table->mdl_request)) DBUG_RETURN(TRUE); @@ -6637,7 +6638,8 @@ view_err: } else { - target_mdl_request.init(MDL_TABLE, new_db, new_name, MDL_EXCLUSIVE); + target_mdl_request.init(MDL_key::TABLE, new_db, new_name, + MDL_EXCLUSIVE); if (thd->mdl_context.try_acquire_exclusive_lock(&target_mdl_request)) DBUG_RETURN(TRUE); if (target_mdl_request.ticket == NULL) -- cgit v1.2.1