mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -310,10 +310,8 @@ static bool open_and_lock_table_for_truncate(THD *thd, TABLE_LIST *table_ref,
|
||||
upgrade_shared_lock_to_exclusive(table_ref->mdl_request.ticket,
|
||||
timeout))
|
||||
DBUG_RETURN(TRUE);
|
||||
mysql_mutex_lock(&LOCK_open);
|
||||
tdc_remove_table(thd, TDC_RT_REMOVE_ALL, table_ref->db,
|
||||
table_ref->table_name);
|
||||
mysql_mutex_unlock(&LOCK_open);
|
||||
table_ref->table_name, FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user