MySQL 8.0.39
Source Code Documentation
|
Classes | |
struct | Handlerton_pair |
class | Replace_field_processor_arg |
This class is used as an input argument to Item::walk, and takes care of replacing the field pointer in Item_field with pointers to a Create_field_wrapper. More... | |
struct | sort_keys |
struct | Viability |
Typedefs | |
using | Viability_error_emitter = std::function< void(const char *engine_name)> |
using | Viability_substitution_warning_emitter = std::function< void(THD *, const char *requested_engine_name, const char *substituted_engine_name, const char *table_name)> |
Functions | |
bool | is_temp_table (const HA_CREATE_INFO &ci) |
bool | is_engine_specified (const HA_CREATE_INFO &ci) |
handlerton * | default_handlerton (THD *thd, const HA_CREATE_INFO &ci) |
handlerton * | requested_handlerton (THD *thd, const HA_CREATE_INFO &ci) |
Viability | get_viability (const handlerton &hton, const HA_CREATE_INFO &ci) |
handlerton * | get_viable_handlerton_for_create_impl (THD *thd, const char *table_name, const HA_CREATE_INFO &ci, Handlerton_pair hp) |
handlerton * | get_viable_handlerton_for_create_like (THD *thd, const char *table_name, const HA_CREATE_INFO &ci, handlerton *source) |
Check if source is enabled AND NOT explicitly disabled (listed in the disabled_storages_engines system variable. More... | |
handlerton * | get_viable_handlerton_for_alter (THD *thd, const HA_CREATE_INFO &ci, handlerton *existing) |
Does nothing (returns existing) unless ALTER changes the ENGINE. More... | |
using anonymous_namespace{sql_table.cc}::Viability_error_emitter = typedef std::function<void(const char *engine_name)> |
using anonymous_namespace{sql_table.cc}::Viability_substitution_warning_emitter = typedef std::function<void( THD *, const char *requested_engine_name, const char *substituted_engine_name, const char *table_name)> |
handlerton * anonymous_namespace{sql_table.cc}::default_handlerton | ( | THD * | thd, |
const HA_CREATE_INFO & | ci | ||
) |
Viability anonymous_namespace{sql_table.cc}::get_viability | ( | const handlerton & | hton, |
const HA_CREATE_INFO & | ci | ||
) |
handlerton * anonymous_namespace{sql_table.cc}::get_viable_handlerton_for_alter | ( | THD * | thd, |
const HA_CREATE_INFO & | ci, | ||
handlerton * | existing | ||
) |
Does nothing (returns existing) unless ALTER changes the ENGINE.
The handlerton for the specified ENGINE is considered viable if it is enabled AND NOT explicitly disabled (listed in the disabled_storages_engines system variable).
If the specified handleton is not viable it falls back to existing if substitution is allowed. existing is used without further checking, and ER_UNKNOWN_STORAGE_ENGINE is emitted as warning.
thd | Thread handler. |
ci | create info struct from parser. |
existing | Handlerton requested by query. |
existing | if ENGINE is not specified or is the same as existing, or if ENGINE is not viable and substitution is permitted. |
Handlerton | of specified engine if this is viable. |
nullptr | if error (specified engine not viable and substitution not permitted). |
handlerton * anonymous_namespace{sql_table.cc}::get_viable_handlerton_for_create_impl | ( | THD * | thd, |
const char * | table_name, | ||
const HA_CREATE_INFO & | ci, | ||
Handlerton_pair | hp | ||
) |
handlerton * anonymous_namespace{sql_table.cc}::get_viable_handlerton_for_create_like | ( | THD * | thd, |
const char * | table_name, | ||
const HA_CREATE_INFO & | ci, | ||
handlerton * | source | ||
) |
Check if source is enabled AND NOT explicitly disabled (listed in the disabled_storages_engines system variable.
If not; falls back to the default (tmp) storage engine if substitution is allowed, unless this is also disabled.
Otherwise, if substitution does take place, ER_DISABLED_STORAGE_ENGINE and ER_USING_OTHER_HANDLER are emitted as warnings.
For temporary tables the above also applies, and in addition the source handlerton is checked to see if it supports temporary tables.
Note that this substitution is allowed even when no_substitution is ON, but will fail if the default handlerton for temporary tables is disabled or does not support temporary tables (unlikely).
thd | Thread handler. |
table_name | Table name. |
ci | create info struct from parser. |
source | Handlerton requested by query. |
source | if this is viable. |
The | default hton if viable and engine substitution is allowed. |
The | default temp hton if viable and a temporary table and source does not support temporary tables. |
nullptr | if error (source not viable and substitution not possible). |
bool anonymous_namespace{sql_table.cc}::is_engine_specified | ( | const HA_CREATE_INFO & | ci | ) |
bool anonymous_namespace{sql_table.cc}::is_temp_table | ( | const HA_CREATE_INFO & | ci | ) |
handlerton * anonymous_namespace{sql_table.cc}::requested_handlerton | ( | THD * | thd, |
const HA_CREATE_INFO & | ci | ||
) |