MySQL 8.4.3
Source Code Documentation
|
This structure is shared between different table objects. More...
#include <table.h>
Public Types | |
enum class | Schema_read_only { NOT_SET , RO_OFF , RO_ON } |
Schema's read only mode - ON (true) or OFF (false). More... | |
Public Member Functions | |
TABLE_SHARE ()=default | |
TABLE_SHARE (unsigned long version, bool secondary) | |
Create a new TABLE_SHARE with the given version number. More... | |
handlerton * | db_type () const |
void | set_table_cache_key (char *key_buff, size_t key_length) |
Set share's table cache key and update its db and table name appropriately. More... | |
void | set_table_cache_key (char *key_buff, const char *key, size_t key_length) |
Set share's table cache key and update its db and table name appropriately. More... | |
ulonglong | get_table_def_version () const |
unsigned long | version () const |
Returns the version of this TABLE_SHARE. More... | |
void | clear_version () |
Set the version of this TABLE_SHARE to zero. More... | |
bool | has_old_version () const |
Is this table share being expelled from the table definition cache? More... | |
enum enum_table_ref_type | get_table_ref_type () const |
Convert unrelated members of TABLE_SHARE to one enum representing its type. More... | |
ulonglong | get_table_ref_version () const |
Return a table metadata version. More... | |
bool | is_missing_primary_key () const |
Determine if the table is missing a PRIMARY KEY. More... | |
uint | find_first_unused_tmp_key (const Key_map &k) |
For a materialized derived table: informs the share that certain not-yet-used keys are going to be used. More... | |
bool | visit_subgraph (Wait_for_flush *waiting_ticket, MDL_wait_for_graph_visitor *gvisitor) |
Traverse portion of wait-for graph which is reachable through this table share in search for deadlocks. More... | |
bool | wait_for_old_version (THD *thd, struct timespec *abstime, uint deadlock_weight) |
Wait until the subject share is removed from the table definition cache and make sure it's destroyed. More... | |
Key_map | usable_indexes (const THD *thd) const |
The set of indexes that the optimizer may use when creating an execution plan. More... | |
void | destroy () |
Release resources and free memory occupied by the table share. More... | |
unsigned int | ref_count () const |
How many TABLE objects use this TABLE_SHARE. More... | |
unsigned int | increment_ref_count () |
Increment the reference count by one. More... | |
unsigned int | decrement_ref_count () |
Decrement the reference count by one. More... | |
bool | is_primary_engine () const |
Does this TABLE_SHARE represent a table in a primary storage engine? More... | |
bool | is_secondary_engine () const |
Does this TABLE_SHARE represent a table in a secondary storage engine? More... | |
bool | has_secondary_engine () const |
Does this TABLE_SHARE represent a primary table that has a shadow copy in a secondary storage engine? More... | |
bool | is_referenced_by_foreign_key () const |
Returns whether this table is referenced by a foreign key. More... | |
Public Attributes | |
Table_histograms_collection * | m_histograms {nullptr} |
TABLE_CATEGORY | table_category {TABLE_UNKNOWN_CATEGORY} |
Category of this table. More... | |
MEM_ROOT | mem_root |
MEM_ROOT * | alloc_for_tmp_file_handler {nullptr} |
Used to allocate new handler for internal temporary table when the size limitation of the primary storage engine is exceeded. More... | |
TYPELIB | keynames |
TYPELIB * | intervals {nullptr} |
mysql_mutex_t | LOCK_ha_data |
TABLE_SHARE * | next {nullptr} |
TABLE_SHARE ** | prev {nullptr} |
Table_cache_element ** | cache_element {nullptr} |
Array of table_cache_instances pointers to elements of table caches respresenting this table in each of Table_cache instances. More... | |
Field ** | field {nullptr} |
Field ** | found_next_number_field {nullptr} |
KEY * | key_info {nullptr} |
uint * | blob_field {nullptr} |
uchar * | default_values {nullptr} |
LEX_STRING | comment {nullptr, 0} |
LEX_STRING | compress {nullptr, 0} |
LEX_STRING | encrypt_type {nullptr, 0} |
LEX_CSTRING | secondary_engine {nullptr, 0} |
Secondary storage engine. More... | |
bool | secondary_load {false} |
Secondary engine load status. More... | |
const CHARSET_INFO * | table_charset |
MY_BITMAP | all_set |
LEX_CSTRING | table_cache_key {nullptr, 0} |
LEX_CSTRING | db {nullptr, 0} |
LEX_CSTRING | table_name {nullptr, 0} |
LEX_STRING | path {nullptr, 0} |
LEX_CSTRING | normalized_path {nullptr, 0} |
LEX_STRING | connect_string {nullptr, 0} |
LEX_CSTRING | engine_attribute = EMPTY_CSTR |
LEX_CSTRING | secondary_engine_attribute = EMPTY_CSTR |
Key_map | keys_in_use |
The set of indexes that are not disabled for this table. More... | |
Key_map | visible_indexes |
The set of visible and enabled indexes for this table. More... | |
Key_map | keys_for_keyread |
ha_rows | min_rows {0} |
ha_rows | max_rows {0} |
ulong | avg_row_length {0} |
ulong | mysql_version {0} |
ulong | reclength {0} |
ulong | stored_rec_length {0} |
ulonglong | autoextend_size {0} |
plugin_ref | db_plugin {nullptr} |
enum row_type | row_type = {} |
Value of ROW_FORMAT option for the table as provided by user. More... | |
enum row_type | real_row_type = {} |
Real row format used for the table by the storage engine. More... | |
tmp_table_type | tmp_table {NO_TMP_TABLE} |
uint | tmp_handler_count {0} |
Only for internal temporary tables. More... | |
uint | tmp_open_count {0} |
Only for internal temporary tables. More... | |
std::uint32_t | key_block_size {0} |
uint | stats_sample_pages {0} |
enum_stats_auto_recalc | stats_auto_recalc {} |
uint | null_bytes {0} |
uint | last_null_bit_pos {0} |
uint | fields {0} |
uint | rec_buff_length {0} |
uint | keys {0} |
uint | key_parts {0} |
uint | max_key_length {0} |
uint | max_unique_length {0} |
uint | total_key_length {0} |
bool | is_distinct {false} |
Whether this is a temporary table that already has a UNIQUE index (removing duplicate rows on insert), so that the optimizer does not need to run DISTINCT itself. More... | |
uint | null_fields {0} |
uint | blob_fields {0} |
uint | varchar_fields {0} |
uint | first_unused_tmp_key {0} |
For materialized derived tables;. More... | |
uint | max_tmp_keys {0} |
For materialized derived tables: allocated size of key_info array. More... | |
uint | max_tmp_key_parts {0} |
For materialized derived tables: allocated size of base_key_parts array of all TABLE objects. More... | |
Key_name * | key_names {nullptr} |
Array of names for generated keys, used for materialized derived tables. More... | |
ulong * | base_rec_per_key {nullptr} |
Records per key array, used for materialized derived tables. More... | |
rec_per_key_t * | base_rec_per_key_float {nullptr} |
Records per key array, float rep., used for materialized derived tables. More... | |
uint | db_create_options {0} |
Bitmap with flags representing some of table options/attributes. More... | |
uint | db_options_in_use {0} |
Bitmap with flags representing some of table options/attributes which are in use by storage engine. More... | |
uint | rowid_field_offset {0} |
uint | primary_key {0} |
uint | next_number_index {0} |
uint | next_number_key_offset {0} |
uint | next_number_keypart {0} |
bool | error {false} |
uint | column_bitmap_size {0} |
uint | vfields {0} |
Number of generated fields. More... | |
uint | gen_def_field_count {0} |
Number of fields having the default value generated. More... | |
bool | system {false} |
bool | db_low_byte_first {false} |
bool | crashed {false} |
bool | is_view {false} |
bool | m_open_in_progress {false} |
mysql::binlog::event::Table_id | table_map_id |
int | cached_row_logging_check {0} |
ha_storage_media | default_storage_media {HA_SM_DEFAULT} |
const char * | tablespace {nullptr} |
partition_info * | m_part_info {nullptr} |
Partition meta data. More... | |
bool | auto_partitioned {false} |
Filled in when reading from frm. More... | |
char * | partition_info_str {nullptr} |
Storing the full partitioning clause (PARTITION BY ...) which is used when creating new partition_info object for each new TABLE object by parsing this string. More... | |
uint | partition_info_str_len {0} |
const TABLE_FIELD_DEF * | table_field_def_cache {nullptr} |
Cache the checked structure of this table. More... | |
Handler_share * | ha_share {nullptr} |
Main handler's share. More... | |
PSI_table_share * | m_psi {nullptr} |
Instrumentation for this table share. More... | |
Wait_for_flush_list | m_flush_tickets |
List of tickets representing threads waiting for the share to be flushed. More... | |
const dd::View * | view_object {nullptr} |
View object holding view definition read from DD. More... | |
dd::Table * | tmp_table_def {nullptr} |
Data-dictionary object describing explicit temporary table represented by this share. More... | |
Query_block * | owner_of_possible_tmp_keys {nullptr} |
For materialized derived tables;. More... | |
uint | foreign_keys {0} |
Arrays with descriptions of foreign keys in which this table participates as child or parent. More... | |
TABLE_SHARE_FOREIGN_KEY_INFO * | foreign_key {nullptr} |
uint | foreign_key_parents {0} |
TABLE_SHARE_FOREIGN_KEY_PARENT_INFO * | foreign_key_parent {nullptr} |
Sql_check_constraint_share_list * | check_constraint_share_list {nullptr} |
Schema_read_only | schema_read_only {Schema_read_only::NOT_SET} |
Protected Attributes | |
bool | m_secondary_engine {false} |
Does this TABLE_SHARE represent a table in a secondary storage engine? More... | |
Private Attributes | |
unsigned int | m_ref_count {0} |
How many TABLE objects use this TABLE_SHARE. More... | |
unsigned long | m_version {0} |
TABLE_SHARE version, if changed the TABLE_SHARE must be reopened. More... | |
This structure is shared between different table objects.
There is one instance of table share per one table in the database.
|
strong |
Schema's read only mode - ON (true) or OFF (false).
This is filled in when the share is initialized with meta data from DD. If the schema is altered, the tables and share are removed. This can be done since ALTER SCHEMA acquires exclusive meta data locks on the tables in the schema. We set this only for non-temporary tables. Otherwise, the value of the member below is 'NOT_SET'.
Enumerator | |
---|---|
NOT_SET | |
RO_OFF | |
RO_ON |
|
default |
|
inline |
Create a new TABLE_SHARE with the given version number.
version | the version of the TABLE_SHARE |
secondary | set to true if the TABLE_SHARE represents a table in a secondary storage engine |
void TABLE_SHARE::clear_version | ( | ) |
Set the version of this TABLE_SHARE to zero.
This marks the TABLE_SHARE for automatic removal from the table definition cache once it is no longer referenced.
|
inline |
|
inline |
Decrement the reference count by one.
void TABLE_SHARE::destroy | ( | ) |
Release resources and free memory occupied by the table share.
Release resources (plugins) used by the share and free its memory.
TABLE_SHARE is self-contained – it's stored in its own MEM_ROOT. Free this MEM_ROOT.
uint TABLE_SHARE::find_first_unused_tmp_key | ( | const Key_map & | k | ) |
For a materialized derived table: informs the share that certain not-yet-used keys are going to be used.
k | Used keys |
|
inline |
|
inline |
Convert unrelated members of TABLE_SHARE to one enum representing its type.
ulonglong TABLE_SHARE::get_table_ref_version | ( | ) | const |
Return a table metadata version.
for base tables and views, we return table_map_id. It is assigned from a global counter incremented for each new table loaded into the table definition cache (TDC). for temporary tables it's table_map_id again. But for temporary tables table_map_id is assigned from thd->query_id. The latter is assigned from a thread local counter incremented for every new SQL statement. Since temporary tables are thread-local, each temporary table gets a unique id. for everything else (e.g. information schema tables), the version id is zero.
This choice of version id is a large compromise to have a working prepared statement validation in 5.1. In future version ids will be persistent, as described in WL#4180.
Let's try to explain why and how this limited solution allows to validate prepared statements.
Firstly, sets (in mathematical sense) of version numbers never intersect for different table types. Therefore, version id of a temporary table is never compared with a version id of a view, and vice versa.
Secondly, for base tables and views, we know that each DDL flushes the respective share from the TDC. This ensures that whenever a table is altered or dropped and recreated, it gets a new version id. Unfortunately, since elements of the TDC are also flushed on LRU basis, this choice of version ids leads to false positives. E.g. when the TDC size is too small, we may have a SELECT FROM INFORMATION_SCHEMA.TABLES flush all its elements, which in turn will lead to a validation error and a subsequent reprepare of all prepared statements. This is considered acceptable, since as long as prepared statements are automatically reprepared, spurious invalidation is only a performance hit. Besides, no better simple solution exists.
For temporary tables, using thd->query_id ensures that if a temporary table was altered or recreated, a new version id is assigned. This suits validation needs very well and will perhaps never change.
Metadata of information schema tables never changes. Thus we can safely assume 0 for a good enough version id.
Finally, by taking into account table type, we always track that a change has taken place when a view is replaced with a base table, a base table is replaced with a temporary table and so on.
0 | For schema tables, DD tables and system views. non-0 For bases tables, views and temporary tables. |
|
inline |
Is this table share being expelled from the table definition cache?
|
inline |
Does this TABLE_SHARE represent a primary table that has a shadow copy in a secondary storage engine?
|
inline |
Increment the reference count by one.
|
inline |
Determine if the table is missing a PRIMARY KEY.
|
inline |
Does this TABLE_SHARE represent a table in a primary storage engine?
|
inline |
Returns whether this table is referenced by a foreign key.
|
inline |
Does this TABLE_SHARE represent a table in a secondary storage engine?
|
inline |
How many TABLE objects use this TABLE_SHARE.
|
inline |
Set share's table cache key and update its db and table name appropriately.
key_buff | Buffer to be used as storage for table cache key (should be at least key_length bytes). |
key | Value for table cache key. |
key_length | Key length. |
NOTE Since 'key_buff' buffer will be used as storage for table cache key it should has same life-time as share itself.
|
inline |
Set share's table cache key and update its db and table name appropriately.
key_buff | Buffer with already built table cache key to be referenced from share. |
key_length | Key length. |
The set of indexes that the optimizer may use when creating an execution plan.
|
inline |
Returns the version of this TABLE_SHARE.
bool TABLE_SHARE::visit_subgraph | ( | Wait_for_flush * | wait_for_flush, |
MDL_wait_for_graph_visitor * | gvisitor | ||
) |
Traverse portion of wait-for graph which is reachable through this table share in search for deadlocks.
wait_for_flush | Undocumented. |
gvisitor | Deadlock detection visitor. |
true | A deadlock is found. A victim is remembered by the visitor. |
false | No deadlocks, it's OK to begin wait. |
bool TABLE_SHARE::wait_for_old_version | ( | THD * | thd, |
struct timespec * | abstime, | ||
uint | deadlock_weight | ||
) |
Wait until the subject share is removed from the table definition cache and make sure it's destroyed.
thd | Session. |
abstime | Timeout for waiting as absolute time value. |
deadlock_weight | Weight of this wait for deadlock detector. |
false | - Success. |
true | - Error (OOM, deadlock, timeout, etc...). |
MY_BITMAP TABLE_SHARE::all_set |
Used to allocate new handler for internal temporary table when the size limitation of the primary storage engine is exceeded.
bool TABLE_SHARE::auto_partitioned {false} |
Filled in when reading from frm.
This can simply be removed when removing the .frm support, since it is already stored in the new DD.
ulonglong TABLE_SHARE::autoextend_size {0} |
ulong TABLE_SHARE::avg_row_length {0} |
ulong* TABLE_SHARE::base_rec_per_key {nullptr} |
Records per key array, used for materialized derived tables.
This is a contiguous array, with size given by max_tmp_key_parts. The array is shared with all TABLE objects referring to this table share.
rec_per_key_t* TABLE_SHARE::base_rec_per_key_float {nullptr} |
Records per key array, float rep., used for materialized derived tables.
This is a contiguous array, with size given by max_tmp_key_parts. The array is shared with all TABLE objects referring to this table share.
uint* TABLE_SHARE::blob_field {nullptr} |
uint TABLE_SHARE::blob_fields {0} |
Table_cache_element** TABLE_SHARE::cache_element {nullptr} |
Array of table_cache_instances pointers to elements of table caches respresenting this table in each of Table_cache instances.
Allocated along with the share itself in alloc_table_share(). Each element of the array is protected by Table_cache::m_lock in the corresponding Table_cache. False sharing should not be a problem in this case as elements of this array are supposed to be updated rarely.
int TABLE_SHARE::cached_row_logging_check {0} |
Sql_check_constraint_share_list* TABLE_SHARE::check_constraint_share_list {nullptr} |
uint TABLE_SHARE::column_bitmap_size {0} |
LEX_STRING TABLE_SHARE::comment {nullptr, 0} |
LEX_STRING TABLE_SHARE::compress {nullptr, 0} |
LEX_STRING TABLE_SHARE::connect_string {nullptr, 0} |
bool TABLE_SHARE::crashed {false} |
LEX_CSTRING TABLE_SHARE::db {nullptr, 0} |
uint TABLE_SHARE::db_create_options {0} |
Bitmap with flags representing some of table options/attributes.
bool TABLE_SHARE::db_low_byte_first {false} |
uint TABLE_SHARE::db_options_in_use {0} |
Bitmap with flags representing some of table options/attributes which are in use by storage engine.
plugin_ref TABLE_SHARE::db_plugin {nullptr} |
ha_storage_media TABLE_SHARE::default_storage_media {HA_SM_DEFAULT} |
LEX_STRING TABLE_SHARE::encrypt_type {nullptr, 0} |
LEX_CSTRING TABLE_SHARE::engine_attribute = EMPTY_CSTR |
bool TABLE_SHARE::error {false} |
uint TABLE_SHARE::fields {0} |
uint TABLE_SHARE::first_unused_tmp_key {0} |
For materialized derived tables;.
TABLE_SHARE_FOREIGN_KEY_INFO* TABLE_SHARE::foreign_key {nullptr} |
TABLE_SHARE_FOREIGN_KEY_PARENT_INFO* TABLE_SHARE::foreign_key_parent {nullptr} |
uint TABLE_SHARE::foreign_key_parents {0} |
uint TABLE_SHARE::foreign_keys {0} |
Arrays with descriptions of foreign keys in which this table participates as child or parent.
We only cache in them information from dd::Table object which is sufficient for use by prelocking algorithm/to check if table is referenced by a foreign key.
uint TABLE_SHARE::gen_def_field_count {0} |
Number of fields having the default value generated.
Handler_share* TABLE_SHARE::ha_share {nullptr} |
Main handler's share.
bool TABLE_SHARE::is_distinct {false} |
Whether this is a temporary table that already has a UNIQUE index (removing duplicate rows on insert), so that the optimizer does not need to run DISTINCT itself.
Also used for INTERSECT and EXCEPT as a fall-back if hashing fails (secondary overflow of in-memory hash table, in which case we revert to de-duplication using the unique key in the output table).
bool TABLE_SHARE::is_view {false} |
std::uint32_t TABLE_SHARE::key_block_size {0} |
Array of names for generated keys, used for materialized derived tables.
Shared among all TABLE objects referring to this table share.
uint TABLE_SHARE::key_parts {0} |
TYPELIB TABLE_SHARE::keynames |
uint TABLE_SHARE::keys {0} |
Key_map TABLE_SHARE::keys_for_keyread |
Key_map TABLE_SHARE::keys_in_use |
The set of indexes that are not disabled for this table.
I.e. it excludes indexes disabled by ALTER TABLE ... DISABLE KEYS
, however it does include invisible indexes. The data dictionary populates this bitmap.
uint TABLE_SHARE::last_null_bit_pos {0} |
mysql_mutex_t TABLE_SHARE::LOCK_ha_data |
Wait_for_flush_list TABLE_SHARE::m_flush_tickets |
List of tickets representing threads waiting for the share to be flushed.
Table_histograms_collection* TABLE_SHARE::m_histograms {nullptr} |
bool TABLE_SHARE::m_open_in_progress {false} |
partition_info* TABLE_SHARE::m_part_info {nullptr} |
Partition meta data.
Allocated from TABLE_SHARE::mem_root, created when reading from the dd tables, used as template for each TABLE instance. The reason for having it on the TABLE_SHARE is to be able to reuse the partition_elements containing partition names, values etc. instead of allocating them for each TABLE instance. TODO: Currently it is filled in and then only used for generating the partition_info_str. The plan is to clone/copy/reference each TABLE::part_info instance from it. What is missing before it can be completed: 1) The partition expression, currently created only during parsing which also needs the current TABLE instance as context for name resolution etc. 2) The partition values, currently the DD stores them as text so it needs to be converted to field images (which is now done by first parsing the value text into an Item, then saving the Item result/value into a field and then finally copy the field image).
PSI_table_share* TABLE_SHARE::m_psi {nullptr} |
Instrumentation for this table share.
|
private |
How many TABLE objects use this TABLE_SHARE.
|
protected |
Does this TABLE_SHARE represent a table in a secondary storage engine?
|
private |
TABLE_SHARE version, if changed the TABLE_SHARE must be reopened.
NOTE: The TABLE_SHARE will not be reopened during LOCK TABLES in close_thread_tables!!!
uint TABLE_SHARE::max_key_length {0} |
ha_rows TABLE_SHARE::max_rows {0} |
uint TABLE_SHARE::max_tmp_key_parts {0} |
For materialized derived tables: allocated size of base_key_parts array of all TABLE objects.
Used for generated keys.
uint TABLE_SHARE::max_tmp_keys {0} |
For materialized derived tables: allocated size of key_info array.
uint TABLE_SHARE::max_unique_length {0} |
MEM_ROOT TABLE_SHARE::mem_root |
ha_rows TABLE_SHARE::min_rows {0} |
ulong TABLE_SHARE::mysql_version {0} |
TABLE_SHARE* TABLE_SHARE::next {nullptr} |
uint TABLE_SHARE::next_number_index {0} |
uint TABLE_SHARE::next_number_key_offset {0} |
uint TABLE_SHARE::next_number_keypart {0} |
LEX_CSTRING TABLE_SHARE::normalized_path {nullptr, 0} |
uint TABLE_SHARE::null_bytes {0} |
uint TABLE_SHARE::null_fields {0} |
Query_block* TABLE_SHARE::owner_of_possible_tmp_keys {nullptr} |
For materialized derived tables;.
char* TABLE_SHARE::partition_info_str {nullptr} |
Storing the full partitioning clause (PARTITION BY ...) which is used when creating new partition_info object for each new TABLE object by parsing this string.
These two will be needed until the missing parts above is fixed.
uint TABLE_SHARE::partition_info_str_len {0} |
LEX_STRING TABLE_SHARE::path {nullptr, 0} |
TABLE_SHARE ** TABLE_SHARE::prev {nullptr} |
uint TABLE_SHARE::primary_key {0} |
enum row_type TABLE_SHARE::real_row_type = {} |
Real row format used for the table by the storage engine.
uint TABLE_SHARE::rec_buff_length {0} |
ulong TABLE_SHARE::reclength {0} |
enum row_type TABLE_SHARE::row_type = {} |
Value of ROW_FORMAT option for the table as provided by user.
Can be different from the real row format used by the storage engine. ROW_TYPE_DEFAULT value indicates that no explicit ROW_FORMAT was specified for the table.
uint TABLE_SHARE::rowid_field_offset {0} |
Schema_read_only TABLE_SHARE::schema_read_only {Schema_read_only::NOT_SET} |
LEX_CSTRING TABLE_SHARE::secondary_engine {nullptr, 0} |
Secondary storage engine.
LEX_CSTRING TABLE_SHARE::secondary_engine_attribute = EMPTY_CSTR |
bool TABLE_SHARE::secondary_load {false} |
Secondary engine load status.
enum_stats_auto_recalc TABLE_SHARE::stats_auto_recalc {} |
uint TABLE_SHARE::stats_sample_pages {0} |
ulong TABLE_SHARE::stored_rec_length {0} |
bool TABLE_SHARE::system {false} |
LEX_CSTRING TABLE_SHARE::table_cache_key {nullptr, 0} |
TABLE_CATEGORY TABLE_SHARE::table_category {TABLE_UNKNOWN_CATEGORY} |
Category of this table.
const CHARSET_INFO* TABLE_SHARE::table_charset |
const TABLE_FIELD_DEF* TABLE_SHARE::table_field_def_cache {nullptr} |
Cache the checked structure of this table.
The pointer data is used to describe the structure that a instance of the table must have. Each element of the array specifies a field that must exist on the table.
The pointer is cached in order to perform the check only once – when the table is loaded from the disk.
mysql::binlog::event::Table_id TABLE_SHARE::table_map_id |
LEX_CSTRING TABLE_SHARE::table_name {nullptr, 0} |
const char* TABLE_SHARE::tablespace {nullptr} |
uint TABLE_SHARE::tmp_handler_count {0} |
Only for internal temporary tables.
Count of TABLEs (having this TABLE_SHARE) which have a "handler" (table->file!=nullptr) which is open (ha_open() has been called).
uint TABLE_SHARE::tmp_open_count {0} |
Only for internal temporary tables.
Count of TABLEs (having this TABLE_SHARE) which have opened this table.
tmp_table_type TABLE_SHARE::tmp_table {NO_TMP_TABLE} |
Data-dictionary object describing explicit temporary table represented by this share.
NULL for other table types (non-temporary tables, internal temporary tables). This object is owned by TABLE_SHARE and should be deleted along with it.
uint TABLE_SHARE::total_key_length {0} |
uint TABLE_SHARE::varchar_fields {0} |
uint TABLE_SHARE::vfields {0} |
Number of generated fields.
View object holding view definition read from DD.
This object is not cached, and is owned by the table share. We are not able to read it on demand since we may then get a cache miss while holding LOCK_OPEN.
Key_map TABLE_SHARE::visible_indexes |
The set of visible and enabled indexes for this table.