1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-26: Global transaction ID

Fix lock order violation. Make sure we temporarily release
LOCK_global_system_variables before taking LOCK_active_mi.
Otherwise we get a lock dependency cycle when we use
open_tables() under LOCK_active_mi.
This commit is contained in:
unknown
2013-02-25 18:03:30 +01:00
parent 2cf3d61fc2
commit 1f08be94bb
3 changed files with 6 additions and 0 deletions

View File

@@ -379,6 +379,7 @@ bool table_def_init(void)
init_tdc_psi_keys();
#endif
mysql_mutex_init(key_LOCK_open, &LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_record_order(&LOCK_active_mi, &LOCK_open);
oldest_unused_share= &end_of_unused_share;
end_of_unused_share.prev= &oldest_unused_share;