MySQL 8.0.39
Source Code Documentation
handler0alter.h File Reference

Smart ALTER TABLE. More...

Go to the source code of this file.

Functions

void alter_stats_rebuild (dict_table_t *table, const char *table_name, THD *thd)
 Adjust the persistent statistics after rebuilding ALTER TABLE. More...
 
void innobase_rec_to_mysql (struct TABLE *table, const rec_t *rec, const dict_index_t *index, const ulint *offsets)
 Copies an InnoDB record to table->record[0]. More...
 
void innobase_fields_to_mysql (struct TABLE *table, const dict_index_t *index, const dfield_t *fields)
 Copies an InnoDB index entry to table->record[0]. More...
 
void innobase_row_to_mysql (struct TABLE *table, const dict_table_t *itab, const dtuple_t *row)
 Copies an InnoDB row to table->record[0]. More...
 
void innobase_rec_reset (struct TABLE *table)
 Resets table->record[0]. More...
 

Variables

constexpr uint32_t ERROR_STR_LENGTH = 1024
 

Detailed Description

Smart ALTER TABLE.

Function Documentation

◆ alter_stats_rebuild()

void alter_stats_rebuild ( dict_table_t table,
const char *  table_name,
THD thd 
)

Adjust the persistent statistics after rebuilding ALTER TABLE.

Remove statistics for dropped indexes, add statistics for created indexes and rename statistics for renamed indexes.

Parameters
tableInnoDB table that was rebuilt by ALTER TABLE
table_nameTable name in MySQL
thdMySQL connection

◆ innobase_fields_to_mysql()

void innobase_fields_to_mysql ( struct TABLE table,
const dict_index_t index,
const dfield_t fields 
)

Copies an InnoDB index entry to table->record[0].

Parameters
[in,out]tableMysql table
[in]indexInnodb index
[in]fieldsInnodb index fields

◆ innobase_rec_reset()

void innobase_rec_reset ( struct TABLE table)

Resets table->record[0].

in/out: MySQL table

Parameters
tablein/out: MySQL table

◆ innobase_rec_to_mysql()

void innobase_rec_to_mysql ( struct TABLE table,
const rec_t rec,
const dict_index_t index,
const ulint offsets 
)

Copies an InnoDB record to table->record[0].

Parameters
[in,out]tableMysql table
[in]recRecord
[in]indexIndex
[in]offsetsrec_get_offsets( rec, index, ...)

◆ innobase_row_to_mysql()

void innobase_row_to_mysql ( struct TABLE table,
const dict_table_t itab,
const dtuple_t row 
)

Copies an InnoDB row to table->record[0].

Parameters
[in,out]tableMysql table
[in]itabInnodb table
[in]rowInnodb row

Variable Documentation

◆ ERROR_STR_LENGTH

constexpr uint32_t ERROR_STR_LENGTH = 1024
constexpr