MySQL 9.1.0
Source Code Documentation
|
Fix schema, table and tablespace. More...
Public Member Functions | |
Fixup_data (bool concurrent, bool is_drop) | |
Constructor. More... | |
template<typename T > | |
bool | fix (THD *thd, const DD_Objs< T > &dd_objects) |
Fix tables for which data is not cloned. More... | |
bool | fix_config_tables (THD *thd) |
Remove data cloned from configuration tables which are not relevant in recipient. More... | |
template<> | |
bool | fix_one_object (THD *thd, const dd::Table *table, size_t thread_number) |
template<> | |
bool | fix_one_object (THD *thd, const dd::Schema *schema, size_t thread_number) |
template<> | |
bool | fix_one_object (THD *thd, const dd::Tablespace *tablespace, size_t thread_number) |
Static Public Attributes | |
static const size_t | S_NUM_CONFIG_TABLES = 0 |
Number of system configuration tables. More... | |
static const std::array< const char *, S_NUM_CONFIG_TABLES > | s_config_tables = {} |
Array of configuration tables. More... | |
Private Member Functions | |
template<typename T > | |
bool | fix_one_object (THD *thd, const T *object, size_t thread_number) |
Check and fix specific DD object. More... | |
template<typename T > | |
void | fix_objects (THD *thd, const DD_Objs_Iter< T > &begin, const DD_Objs_Iter< T > &end, size_t thread_number) |
Check and fix a rangle of DD objects. More... | |
size_t | get_num_tasks () const |
void | set_num_tasks (size_t num_entries) |
Calculate and set number of new tasks to spawn. More... | |
bool | is_drop () const |
bool | allow_concurrent () const |
const char * | sql_operation () |
Get the table operation string. More... | |
bool | skip_se_tables (enum legacy_db_type type) |
Check if the current SE type should be skipped. More... | |
bool | is_performance_schema (const char *schema_name) const |
Check if the schema is performance schema. More... | |
bool | is_system_schema (const char *schema_name) const |
Check if the current schema is system schema. More... | |
bool | skip_schema_tables (const dd::Table *table, const char *table_name, const char *schema_name) |
Check if the current schema tables needs to be skipped. More... | |
bool | skip_schema (const char *schema_name) |
Check if the current schema needs to be skipped. More... | |
bool | skip_tablespace (THD *thd, const dd::Tablespace *dd_space) |
Check if the current tablespace needs to be skipped. More... | |
bool | execute_sql (THD *thd, const char *schema_name, const char *table_name, const char *tablespace_name, size_t thread_number) |
Form and execute sql command. More... | |
bool | failed () const |
Private Attributes | |
std::atomic_size_t | m_num_errors |
Number of tasks failed. More... | |
size_t | m_num_tasks |
Number of tasks. More... | |
bool | m_concurrent |
Allow concurrent threads. More... | |
bool | m_drop |
If the objects need to be dropped. More... | |
Fix schema, table and tablespace.
Used for two different purposes.
|
inline |
Constructor.
[in] | concurrent | spawn multiple threads |
[in] | is_drop | the operation is drop |
|
inlineprivate |
|
private |
Form and execute sql command.
[in,out] | thd | current THD |
[in] | schema_name | schema name |
[in] | table_name | table name |
[in] | tablespace_name | tablespace name |
[in] | thread_number | current thread number. |
|
inlineprivate |
|
inline |
Fix tables for which data is not cloned.
[in,out] | thd | current THD |
[in] | dd_objects | table/schema/tablespace from DD |
bool anonymous_namespace{clone0api.cc}::Fixup_data::fix_config_tables | ( | THD * | thd | ) |
Remove data cloned from configuration tables which are not relevant in recipient.
[in,out] | thd | current THD |
|
private |
Check and fix a rangle of DD objects.
[in,out] | thd | current THD |
[in] | begin | first element in current slice |
[in] | end | last element in current slice |
[in] | thread_number | current thread number. |
bool anonymous_namespace{clone0api.cc}::Fixup_data::fix_one_object | ( | THD * | thd, |
const dd::Schema * | schema, | ||
size_t | thread_number | ||
) |
bool anonymous_namespace{clone0api.cc}::Fixup_data::fix_one_object | ( | THD * | thd, |
const dd::Table * | table, | ||
size_t | thread_number | ||
) |
bool anonymous_namespace{clone0api.cc}::Fixup_data::fix_one_object | ( | THD * | thd, |
const dd::Tablespace * | tablespace, | ||
size_t | thread_number | ||
) |
|
private |
Check and fix specific DD object.
[in,out] | thd | current THD |
[in] | object | DD object |
[in] | thread_number | current thread number. |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Check if the schema is performance schema.
[in] | schema_name | schema name |
|
inlineprivate |
Check if the current schema is system schema.
[in] | schema_name | schema name |
|
inlineprivate |
Calculate and set number of new tasks to spawn.
[in] | num_entries | number of entries to handle |
|
inlineprivate |
Check if the current schema needs to be skipped.
[in] | schema_name | schema name |
|
inlineprivate |
Check if the current schema tables needs to be skipped.
[in] | table | DD table |
[in] | table_name | table name |
[in] | schema_name | schema name |
|
inlineprivate |
Check if the current SE type should be skipped.
[in] | type | SE type |
|
inlineprivate |
Check if the current tablespace needs to be skipped.
[in,out] | thd | current THD |
[in] | dd_space | dd tablespace |
|
inlineprivate |
Get the table operation string.
|
private |
Allow concurrent threads.
|
private |
If the objects need to be dropped.
|
private |
Number of tasks failed.
|
private |
Number of tasks.
|
static |
Array of configuration tables.
|
static |
Number of system configuration tables.