MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Table_cache_manager Class Reference

#include <table_cache.h>

Public Member Functions

bool init ()
void destroy ()
Table_cacheget_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

Detailed Description

Container class for all table cache instances in the system.

Definition at line 145 of file table_cache.h.

Member Function Documentation

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

uint Table_cache_manager::cache_index ( Table_cache cache) const
inline

Get index for the table cache in container.

Definition at line 162 of file table_cache.h.

Here is the caller graph for this function:

uint Table_cache_manager::cached_tables ( )

Get total number of used and unused TABLE objects in all table caches.

Note
Doesn't require acquisition of table cache locks if inexact number of tables is acceptable.

Definition at line 263 of file table_cache.cc.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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.

Parameters
thdThread context
remove_typeType of removal.
See Also
tdc_remove_table().
Parameters
shareTABLE_SHARE for the table to be removed.
Note
Caller should own LOCK_open and locks on all table cache instances.

Definition at line 337 of file table_cache.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Table_cache* Table_cache_manager::get_cache ( THD *  thd)
inline

Get instance of table cache to be used by particular connection.

Definition at line 156 of file table_cache.h.

Here is the caller graph for this function:

bool Table_cache_manager::init ( void  )

Initialize all instances of table cache to be used by server.

Return values
false- success.
true- failure.

Definition at line 230 of file table_cache.cc.

Here is the call graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

Member Data Documentation

const int Table_cache_manager::MAX_TABLE_CACHES = 64
static

Maximum supported number of table cache instances.

Definition at line 150 of file table_cache.h.


The documentation for this class was generated from the following files: