From f8bfa3287ded5212a28c6d4bbf2d4afee8e5c403 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Mon, 9 Aug 2010 22:33:47 +0400 Subject: A fix for Bug#41158 "DROP TABLE holds LOCK_open during unlink()". Remove acquisition of LOCK_open around file system operations, since such operations are now protected by metadata locks. Rework table discovery algorithm to not require LOCK_open. No new tests added since all MDL locking operations are covered in lock.test and mdl_sync.test, and as long as these tests pass despite the increased concurrency, consistency must be unaffected. --- sql/sql_insert.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index a0d347f48de..ce4535307c8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3600,11 +3600,9 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, */ if (open_table(thd, create_table, thd->mem_root, &ot_ctx)) { - mysql_mutex_lock(&LOCK_open); quick_rm_table(create_info->db_type, create_table->db, table_case_name(create_info, create_table->table_name), 0); - mysql_mutex_unlock(&LOCK_open); } else table= create_table->table; -- cgit v1.2.1