summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-10 11:21:38 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-10 11:21:38 +0300
commitf26f632b44dfe9a6cc239a10f8697ba0ba50675d (patch)
tree63d802f5d2e953b669797edffdff4c6952dd7b65 /sql/sql_table.cc
parent634a81094288b9e47649ceed749d59af18a97e26 (diff)
downloadmariadb-git-f26f632b44dfe9a6cc239a10f8697ba0ba50675d.tar.gz
Backport of:
------------------------------------------------------------ revno: 2617.68.25 committer: Dmitry Lenev <dlenev@mysql.com> 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).
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 6 insertions, 4 deletions
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)