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/table.h | |
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/table.h')
-rw-r--r-- | sql/table.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h index fa88a2c4cfb..38a33886869 100644 --- a/sql/table.h +++ b/sql/table.h @@ -616,12 +616,14 @@ struct TABLE_SHARE struct { /** - Protects ref_count and m_flush_tickets. + Protects ref_count, m_flush_tickets, all_tables, free_tables, flushed, + all_tables_refs. */ mysql_mutex_t LOCK_table_share; mysql_cond_t COND_release; TABLE_SHARE *next, **prev; /* Link to unused shares */ uint ref_count; /* How many TABLE objects uses this */ + uint all_tables_refs; /* Number of refs to all_tables */ /** List of tickets representing threads waiting for the share to be flushed. */ |