My Project
Public Member Functions | Static Public Attributes | Friends
Table_cache_manager Class Reference

#include <table_cache.h>

List of all members.

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.


Member Function Documentation

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.

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.

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.

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.
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.

Return values:
false- success.
true- failure.

Acquire locks on all instances of table cache and table definition cache (i.e. LOCK_open).

Print debug information for the contents of all table cache instances.

Release locks on all instances of table cache and table definition cache.


Member Data Documentation

const int Table_cache_manager::MAX_TABLE_CACHES = 64 [static]

Maximum supported number of table cache instances.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines