MySQL 9.1.0
Source Code Documentation
row_import Struct Reference

Meta data required by IMPORT. More...

Public Member Functions

 row_import () 1
 
 ~row_import () 1
 row_import destructor. More...
 
row_index_tget_index (const char *name) const 1
 Find the index entry in in the indexes array. More...
 
ulint get_n_rows (const char *name) const 1
 Get the number of rows in the index. More...
 
ulint find_col (const char *name) const 1
 Find the ordinal value of the column name in the cfg table columns. More...
 
ulint get_n_purge_failed (const char *name) const 1
 Get the number of rows for which purge failed during the convert phase. More...
 
bool requires_purge (const char *name) const 1
 Check if the index is clean. More...
 
void set_root_by_name () 1
 Set the index root <space, pageno> using the index name. More...
 
dberr_t set_root_by_heuristic () 1
 Set the index root <space, pageno> using a heuristic. More...
 
dberr_t match_index_columns (THD *thd, const dict_index_t *index) 1
 Check if the index schema that was read from the .cfg file matches the in memory index definition. More...
 
dberr_t match_col_default_values (THD *thd, const dd::Table *dd_table) 1
 Check if the column default values of table schema that was read from the .cfg file matches the in memory column definition. More...
 
dberr_t match_compression_type_option (THD *thd, const dd::Table *dd_table) 1
 Check if the table schema that was read from the .cfg file matches the in memory table definition. More...
 
dberr_t match_table_columns (THD *thd) 1
 Check if the table schema that was read from the .cfg file matches the in memory table definition. More...
 
dberr_t match_schema (THD *thd, const dd::Table *dd_table) 1
 Check if the table (and index) schema that was read from the .cfg file matches the in memory table definition. More...
 
bool has_row_versions ()
 Check if table being imported has INSTANT ADD/DROP columns. More...
 

Public Attributes

dict_table_tm_table
 Table instance. More...
 
uint32_t m_version
 Version of config file. More...
 
bytem_hostname
 Hostname where the tablespace was exported. More...
 
bytem_table_name
 Exporting instance table name. More...
 
mem_heap_tm_heap
 Memory heap for default value of instant columns. More...
 
uint64_t m_autoinc
 Next autoinc value. More...
 
page_size_t m_page_size
 Tablespace page size. More...
 
uint32_t m_flags
 Table flags. More...
 
ulint m_n_cols
 Number of columns in the meta-data file. More...
 
uint32_t m_initial_column_count {0}
 
uint32_t m_current_column_count {0}
 
uint32_t m_total_column_count {0}
 
uint32_t m_n_instant_drop_cols {0}
 
uint32_t m_current_row_version {0}
 
uint16_t m_n_instant_cols
 Number of columns before first instant ADD COLUMN in the meta-data file. More...
 
uint32_t m_n_instant_nullable
 
dict_col_tm_cols
 Column data. More...
 
byte ** m_col_names
 Column names, we store the column names separately because there is no field to store the value in dict_col_t. More...
 
ulint m_n_indexes
 Number of indexes, including clustered index. More...
 
row_index_tm_indexes
 Index meta data. More...
 
bool m_missing
 true if a .cfg file was found and was readable More...
 
bool m_has_sdi
 true if tablespace has SDI More...
 
bool m_cfp_missing
 true if a .cfp file was found and was readable More...
 
Compression::Type m_compression_type {}
 Compression type in the meta-data file. More...
 
Encryption_metadata m_encryption_metadata {}
 Encryption settings. More...
 

Private Member Functions

dberr_t set_instant_info (THD *thd, const dd::Table *dd_table) 1
 Set the instant ADD COLUMN information to the table. More...
 
dberr_t set_instant_info_v2 (THD *thd, const dd::Table *dd_table) 1
 Set the instant ADD/DROP COLUMN information to the table. More...
 
dberr_t match_instant_metadata_in_target_table (THD *thd)
 Match INSTANT metadata of CFG file and target table when both source and target table has INSTANT columns. More...
 
dberr_t adjust_instant_metadata_in_taregt_table (THD *thd, const dd::Table *dd_table)
 Update INSTANT metadata into target table when only source has INSTANT columns. More...
 
dberr_t add_instant_dropped_columns (dict_table_t *target_table)
 Add INSTANT DROP columns to target table innodb cache. More...
 

Detailed Description

Meta data required by IMPORT.

Constructor & Destructor Documentation

◆ row_import()

row_import::row_import ( )
inline

◆ ~row_import()

row_import::~row_import ( )

row_import destructor.

Member Function Documentation

◆ add_instant_dropped_columns()

dberr_t row_import::add_instant_dropped_columns ( dict_table_t target_table)
private

Add INSTANT DROP columns to target table innodb cache.

Parameters
[in]target_tabletarget table in InnoDB cache.
Returns
DB_SUCCESS or error code.

◆ adjust_instant_metadata_in_taregt_table()

dberr_t row_import::adjust_instant_metadata_in_taregt_table ( THD thd,
const dd::Table dd_table 
)
private

Update INSTANT metadata into target table when only source has INSTANT columns.

Parameters
[in]thdMySQL session
[in,out]dd_tabletarget table definition
Returns
DB_SUCCESS or error code.

◆ find_col()

ulint row_import::find_col ( const char *  name) const

Find the ordinal value of the column name in the cfg table columns.

Parameters
nameof column to look for.
Returns
ULINT_UNDEFINED if not found.

◆ get_index()

row_index_t * row_import::get_index ( const char *  name) const

Find the index entry in in the indexes array.

Parameters
nameindex name
Returns
instance if found else 0.

◆ get_n_purge_failed()

ulint row_import::get_n_purge_failed ( const char *  name) const

Get the number of rows for which purge failed during the convert phase.

Get the number of rows for which purge failed uding the convert phase.

Parameters
nameindex name
Returns
number of rows for which purge failed.

◆ get_n_rows()

ulint row_import::get_n_rows ( const char *  name) const

Get the number of rows in the index.

Parameters
nameindex name
Returns
number of rows (doesn't include delete marked rows).

◆ has_row_versions()

bool row_import::has_row_versions ( )
inline

Check if table being imported has INSTANT ADD/DROP columns.

Returns
true if table has INSTANT ADD/DROP columns

◆ match_col_default_values()

dberr_t row_import::match_col_default_values ( THD thd,
const dd::Table dd_table 
)

Check if the column default values of table schema that was read from the .cfg file matches the in memory column definition.

Parameters
[in]thdMySQL session variable
[in]dd_tabledd::Table
Returns
DB_SUCCESS or error code.

◆ match_compression_type_option()

dberr_t row_import::match_compression_type_option ( THD thd,
const dd::Table dd_table 
)

Check if the table schema that was read from the .cfg file matches the in memory table definition.

Parameters
[in]thdMySQL session variable
[in]dd_tabledd::Table
Returns
DB_SUCCESS or error code.

◆ match_index_columns()

dberr_t row_import::match_index_columns ( THD thd,
const dict_index_t index 
)

Check if the index schema that was read from the .cfg file matches the in memory index definition.

Note: It will update row_import_t::m_srv_index to map the meta-data read from the .cfg file to the server index instance.

Returns
DB_SUCCESS or error code.
DB_SUCCESS or error code.

◆ match_instant_metadata_in_target_table()

dberr_t row_import::match_instant_metadata_in_target_table ( THD thd)
private

Match INSTANT metadata of CFG file and target table when both source and target table has INSTANT columns.

Parameters
[in]thdMySQL session
Returns
DB_SUCCESS or error code.

◆ match_schema()

dberr_t row_import::match_schema ( THD thd,
const dd::Table dd_table 
)

Check if the table (and index) schema that was read from the .cfg file matches the in memory table definition.

Parameters
[in]thdMySQL session variable
[in]dd_tabledd::Table
Returns
DB_SUCCESS or error code.

◆ match_table_columns()

dberr_t row_import::match_table_columns ( THD thd)

Check if the table schema that was read from the .cfg file matches the in memory table definition.

Parameters
thdMySQL session variable
Returns
DB_SUCCESS or error code.

◆ requires_purge()

bool row_import::requires_purge ( const char *  name) const
inline

Check if the index is clean.

ie. no delete-marked records

Parameters
nameindex name
Returns
true if index needs to be purged.

◆ set_instant_info()

dberr_t row_import::set_instant_info ( THD thd,
const dd::Table dd_table 
)
private

Set the instant ADD COLUMN information to the table.

Returns
DB_SUCCESS if all instant columns are trailing columns, or error code

◆ set_instant_info_v2()

dberr_t row_import::set_instant_info_v2 ( THD thd,
const dd::Table dd_table 
)
private

Set the instant ADD/DROP COLUMN information to the table.

Parameters
[in]thdMySQL session
[in,out]dd_tabletarget table definition
Returns
DB_SUCCESS or error code.
DB_SUCCESS if successful, or error code

◆ set_root_by_heuristic()

dberr_t row_import::set_root_by_heuristic ( )

Set the index root <space, pageno> using a heuristic.

Set the index root <space, pageno>, using a heuristic.

Returns
DB_SUCCESS or error code

◆ set_root_by_name()

void row_import::set_root_by_name ( )

Set the index root <space, pageno> using the index name.

Set the index root <space, pageno>, using index name.

Member Data Documentation

◆ m_autoinc

uint64_t row_import::m_autoinc

Next autoinc value.

◆ m_cfp_missing

bool row_import::m_cfp_missing

true if a .cfp file was found and was readable

◆ m_col_names

byte** row_import::m_col_names

Column names, we store the column names separately because there is no field to store the value in dict_col_t.

◆ m_cols

dict_col_t* row_import::m_cols

Column data.

◆ m_compression_type

Compression::Type row_import::m_compression_type {}

Compression type in the meta-data file.

◆ m_current_column_count

uint32_t row_import::m_current_column_count {0}

◆ m_current_row_version

uint32_t row_import::m_current_row_version {0}

◆ m_encryption_metadata

Encryption_metadata row_import::m_encryption_metadata {}

Encryption settings.

◆ m_flags

uint32_t row_import::m_flags

Table flags.

◆ m_has_sdi

bool row_import::m_has_sdi

true if tablespace has SDI

◆ m_heap

mem_heap_t* row_import::m_heap

Memory heap for default value of instant columns.

◆ m_hostname

byte* row_import::m_hostname

Hostname where the tablespace was exported.

◆ m_indexes

row_index_t* row_import::m_indexes

Index meta data.

◆ m_initial_column_count

uint32_t row_import::m_initial_column_count {0}

◆ m_missing

bool row_import::m_missing

true if a .cfg file was found and was readable

◆ m_n_cols

ulint row_import::m_n_cols

Number of columns in the meta-data file.

◆ m_n_indexes

ulint row_import::m_n_indexes

Number of indexes, including clustered index.

◆ m_n_instant_cols

uint16_t row_import::m_n_instant_cols

Number of columns before first instant ADD COLUMN in the meta-data file.

◆ m_n_instant_drop_cols

uint32_t row_import::m_n_instant_drop_cols {0}

◆ m_n_instant_nullable

uint32_t row_import::m_n_instant_nullable

◆ m_page_size

page_size_t row_import::m_page_size

Tablespace page size.

◆ m_table

dict_table_t* row_import::m_table

Table instance.

◆ m_table_name

byte* row_import::m_table_name

Exporting instance table name.

◆ m_total_column_count

uint32_t row_import::m_total_column_count {0}

◆ m_version

uint32_t row_import::m_version

Version of config file.


The documentation for this struct was generated from the following file: