MySQL 5.6.14 Source Code Document
|
#include <table_cache.h>
Public Member Functions | |
bool | init () |
void | destroy () |
Table_cache * | get_cache (THD *thd) |
uint | cache_index (Table_cache *cache) const |
uint | cached_tables () |
void | lock_all_and_tdc () |
void | unlock_all_and_tdc () |
void | assert_owner_all () |
void | assert_owner_all_and_tdc () |
void | free_table (THD *thd, enum_tdc_remove_table_type remove_type, TABLE_SHARE *share) |
void | free_all_unused_tables () |
void | print_tables () |
Static Public Attributes | |
static const int | MAX_TABLE_CACHES = 64 |
Friends | |
class | Table_cache_iterator |
Container class for all table cache instances in the system.
Definition at line 145 of file table_cache.h.
void Table_cache_manager::assert_owner_all | ( | ) |
Assert that caller owns locks on all instances of table cache.
Definition at line 306 of file table_cache.cc.
void Table_cache_manager::assert_owner_all_and_tdc | ( | ) |
Assert that caller owns locks on all instances of table cache and table definition cache.
Definition at line 318 of file table_cache.cc.
|
inline |
Get index for the table cache in container.
Definition at line 162 of file table_cache.h.
uint Table_cache_manager::cached_tables | ( | ) |
Get total number of used and unused TABLE objects in all table caches.
Definition at line 263 of file table_cache.cc.
void Table_cache_manager::destroy | ( | ) |
Destroy all instances of table cache which were used by server.
Definition at line 249 of file table_cache.cc.
void Table_cache_manager::free_all_unused_tables | ( | ) |
Free all unused TABLE objects in all table cache instances.
Definition at line 389 of file table_cache.cc.
void Table_cache_manager::free_table | ( | THD * | thd, |
enum_tdc_remove_table_type | remove_type, | ||
TABLE_SHARE * | share | ||
) |
Remove and free all or some (depending on parameter) TABLE objects for the table from all table cache instances.
thd | Thread context |
remove_type | Type of removal. |
share | TABLE_SHARE for the table to be removed. |
Definition at line 337 of file table_cache.cc.
|
inline |
Get instance of table cache to be used by particular connection.
Definition at line 156 of file table_cache.h.
bool Table_cache_manager::init | ( | void | ) |
Initialize all instances of table cache to be used by server.
false | - success. |
true | - failure. |
Definition at line 230 of file table_cache.cc.
void Table_cache_manager::lock_all_and_tdc | ( | ) |
Acquire locks on all instances of table cache and table definition cache (i.e. LOCK_open).
Definition at line 279 of file table_cache.cc.
void Table_cache_manager::print_tables | ( | ) |
Print debug information for the contents of all table cache instances.
Definition at line 403 of file table_cache.cc.
void Table_cache_manager::unlock_all_and_tdc | ( | ) |
Release locks on all instances of table cache and table definition cache.
Definition at line 293 of file table_cache.cc.
|
static |
Maximum supported number of table cache instances.
Definition at line 150 of file table_cache.h.