diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-03-20 11:11:13 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-03-20 11:11:13 +0400 |
commit | e4fde57712afd106ccf9752ceadcdcac604da8d9 (patch) | |
tree | 38fa87f38f8af27d47f51bb9ebee3623b5b8bfcc /sql/lock.cc | |
parent | 8250824a12fc173f14af8bb6a2cdbc29a94a84f0 (diff) | |
download | mariadb-git-e4fde57712afd106ccf9752ceadcdcac604da8d9.tar.gz |
MDEV-5864 - Reduce usage of LOCK_open: TABLE_SHARE::tdc.free_tables
Let TABLE_SHARE::tdc.free_tables, TABLE_SHARE::tdc.all_tables,
TABLE_SHARE::tdc.flushed and corresponding invariants be protected by
per-share TABLE_SHARE::tdc.LOCK_table_share instead of global LOCK_open.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index c3f6da02ca1..54681d25b0a 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -790,7 +790,6 @@ MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count, uint flags) @param thd Thread handle. @param db The database name. - This function cannot be called while holding LOCK_open mutex. To avoid deadlocks, we do not try to obtain exclusive metadata locks in LOCK TABLES mode, since in this mode there may be other metadata locks already taken by the current connection, @@ -842,9 +841,7 @@ bool lock_schema_name(THD *thd, const char *db) @param name Object name in the schema. This function assumes that no metadata locks were acquired - before calling it. Additionally, it cannot be called while - holding LOCK_open mutex. Both these invariants are enforced by - asserts in MDL_context::acquire_locks(). + before calling it. It is enforced by asserts in MDL_context::acquire_locks(). To avoid deadlocks, we do not try to obtain exclusive metadata locks in LOCK TABLES mode, since in this mode there may be other metadata locks already taken by the current connection, |