![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
Container class for all table cache instances in the system. More...
#include <table_cache.h>
Public Member Functions | |
| bool | init () | 
| Initialize all instances of table cache to be used by server.  More... | |
| void | destroy () | 
| Destroy all instances of table cache which were used by server.  More... | |
| Table_cache * | get_cache (THD *thd) | 
| Get instance of table cache to be used by particular connection.  More... | |
| uint | cache_index (Table_cache *cache) const | 
| Get index for the table cache in container.  More... | |
| uint | cached_tables () | 
| Get total number of used and unused TABLE objects in all table caches.  More... | |
| void | lock_all_and_tdc () | 
| Acquire locks on all instances of table cache and table definition cache (i.e.  More... | |
| void | unlock_all_and_tdc () | 
| Release locks on all instances of table cache and table definition cache.  More... | |
| void | assert_owner (THD *thd) | 
| Assert that caller owns lock on the table cache.  More... | |
| void | assert_owner_all () | 
| Assert that caller owns locks on all instances of table cache.  More... | |
| void | assert_owner_all_and_tdc () | 
| Assert that caller owns locks on all instances of table cache and table definition cache.  More... | |
| void | 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.  More... | |
| void | free_all_unused_tables () | 
| Free all unused TABLE objects in all table cache instances.  More... | |
| void | print_tables () | 
| Print debug information for the contents of all table cache instances.  More... | |
Static Public Attributes | |
| static const int | MAX_TABLE_CACHES = 64 | 
| Maximum supported number of table cache instances.  More... | |
| static const int | DEFAULT_MAX_TABLE_CACHES = 16 | 
| Default number of table cache instances.  More... | |
Private Attributes | |
| Table_cache | m_table_cache [MAX_TABLE_CACHES] | 
| An array of Table_cache instances.  More... | |
Friends | |
| class | Table_cache_iterator | 
Container class for all table cache instances in the system.
| void Table_cache_manager::assert_owner | ( | THD * | thd | ) | 
Assert that caller owns lock on the table cache.
| thd | Thread handle | 
| void Table_cache_manager::assert_owner_all | ( | ) | 
Assert that caller owns locks on all instances of table cache.
| void Table_cache_manager::assert_owner_all_and_tdc | ( | ) | 
Assert that caller owns locks on all instances of table cache and table definition cache.
      
  | 
  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.
| void Table_cache_manager::free_all_unused_tables | ( | ) | 
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. | 
      
  | 
  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. | 
| void Table_cache_manager::lock_all_and_tdc | ( | ) | 
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.
| void Table_cache_manager::unlock_all_and_tdc | ( | ) | 
Release locks on all instances of table cache and table definition cache.
      
  | 
  friend | 
      
  | 
  static | 
Default number of table cache instances.
      
  | 
  private | 
An array of Table_cache instances.
Only the first table_cache_instances elements in it are used.
      
  | 
  static | 
Maximum supported number of table cache instances.