My Project
|
#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.
Assert that caller owns locks on all instances of table cache.
Assert that caller owns locks on all instances of table cache and table definition cache.
uint Table_cache_manager::cache_index | ( | Table_cache * | cache | ) | const [inline] |
Get index for the table cache in container.
uint Table_cache_manager::cached_tables | ( | ) |
Get total number of used and unused TABLE objects in all table caches.
void Table_cache_manager::destroy | ( | ) |
Destroy all instances of table cache which were used by server.
Free all unused TABLE objects in all table cache instances.
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. |
Table_cache* Table_cache_manager::get_cache | ( | THD * | thd | ) | [inline] |
Get instance of table cache to be used by particular connection.
bool Table_cache_manager::init | ( | void | ) |
Initialize all instances of table cache to be used by server.
false | - success. |
true | - failure. |
Acquire locks on all instances of table cache and table definition cache (i.e. LOCK_open).
void Table_cache_manager::print_tables | ( | ) |
Print debug information for the contents of all table cache instances.
Release locks on all instances of table cache and table definition cache.
const int Table_cache_manager::MAX_TABLE_CACHES = 64 [static] |
Maximum supported number of table cache instances.