MySQL 9.0.0
Source Code Documentation
Instant_ddl_impl< Table > Class Template Reference

#include <dict0inst.h>

Public Member Functions

 Instant_ddl_impl ()=delete
 
 Instant_ddl_impl (Alter_inplace_info *alter_info, THD *thd, trx_t *trx, dict_table_t *dict_table, const TABLE *old_table, const TABLE *altered_table, const Table *old_dd_tab, Table *new_dd_tab, uint64_t *autoinc)
 Constructor. More...
 
 ~Instant_ddl_impl ()
 Destructor. More...
 
bool commit_instant_ddl ()
 Commit instant DDL. More...
 

Static Public Member Functions

static bool is_instant_add_drop_possible (const Alter_inplace_info *ha_alter_info, const TABLE *table, const TABLE *altered_table, const dict_table_t *dict_table)
 Check if INSTANT ADD/DROP can be done. More...
 

Private Member Functions

bool commit_instant_add_col_low ()
 Add column instantly. More...
 
bool commit_instant_drop_col_low ()
 Add column instantly. More...
 
bool commit_instant_add_col ()
 Add columns instantly. More...
 
bool commit_instant_drop_col ()
 Drop columns instantly. More...
 
void populate_to_be_instant_columns ()
 Fetch columns which are to be added or dropped instantly. More...
 
void dd_commit_inplace_no_change (bool ignore_fts)
 Update metadata in commit phase when the alter table does no change to the table. More...
 
bool commit_instant_add_col ()
 
bool commit_instant_add_col ()
 
bool commit_instant_drop_col ()
 
bool commit_instant_drop_col ()
 

Private Attributes

Columns m_cols_to_add
 
Columns m_cols_to_drop
 
Alter_inplace_infom_ha_alter_info
 
THDm_thd
 
trx_tm_trx
 
dict_table_tm_dict_table
 
const TABLEm_old_table
 
const TABLEm_altered_table
 
const Table * m_old_dd_tab
 
Table * m_new_dd_tab
 
uint64_t * m_autoinc
 

Constructor & Destructor Documentation

◆ Instant_ddl_impl() [1/2]

template<typename Table >
Instant_ddl_impl< Table >::Instant_ddl_impl ( )
delete

◆ Instant_ddl_impl() [2/2]

template<typename Table >
Instant_ddl_impl< Table >::Instant_ddl_impl ( Alter_inplace_info alter_info,
THD thd,
trx_t trx,
dict_table_t dict_table,
const TABLE old_table,
const TABLE altered_table,
const Table *  old_dd_tab,
Table *  new_dd_tab,
uint64_t *  autoinc 
)
inline

Constructor.

Parameters
[in]alter_infoinplace alter information
[in]thduser thread
[in]trxtransaction
[in,out]dict_tableinnodb dictionary cache object
[in]old_tableold global DD cache object
[in,out]altered_tablenew MySQL table object
[in]old_dd_tabold global DD cache object
[in,out]new_dd_tabnew global DD cache object
[in]autoincauto increment

◆ ~Instant_ddl_impl()

template<typename Table >
Instant_ddl_impl< Table >::~Instant_ddl_impl ( )
inline

Destructor.

Member Function Documentation

◆ commit_instant_add_col() [1/3]

bool Instant_ddl_impl< dd::Table >::commit_instant_add_col ( )
private

◆ commit_instant_add_col() [2/3]

bool Instant_ddl_impl< dd::Partition >::commit_instant_add_col ( )
private

◆ commit_instant_add_col() [3/3]

template<typename Table >
bool Instant_ddl_impl< Table >::commit_instant_add_col ( )
private

Add columns instantly.

Return values
trueFailure
falseSuccess

◆ commit_instant_add_col_low()

template<typename Table >
template bool Instant_ddl_impl< Table >::commit_instant_add_col_low ( )
private

Add column instantly.

Return values
trueFailure
falseSuccess

◆ commit_instant_ddl()

template<typename Table >
template bool Instant_ddl_impl< Table >::commit_instant_ddl ( )

Commit instant DDL.

Return values
trueFailure
falseSuccess

◆ commit_instant_drop_col() [1/3]

bool Instant_ddl_impl< dd::Table >::commit_instant_drop_col ( )
private

◆ commit_instant_drop_col() [2/3]

bool Instant_ddl_impl< dd::Partition >::commit_instant_drop_col ( )
private

◆ commit_instant_drop_col() [3/3]

template<typename Table >
bool Instant_ddl_impl< Table >::commit_instant_drop_col ( )
private

Drop columns instantly.

Return values
trueFailure
falseSuccess

◆ commit_instant_drop_col_low()

template<typename Table >
template bool Instant_ddl_impl< Table >::commit_instant_drop_col_low ( )
private

Add column instantly.

Return values
trueFailure
falseSuccess

◆ dd_commit_inplace_no_change()

template<typename Table >
void Instant_ddl_impl< Table >::dd_commit_inplace_no_change ( bool  ignore_fts)
private

Update metadata in commit phase when the alter table does no change to the table.

Parameters
[in]ignore_ftsignore FTS update if true

◆ is_instant_add_drop_possible()

template<typename Table >
template bool Instant_ddl_impl< Table >::is_instant_add_drop_possible ( const Alter_inplace_info ha_alter_info,
const TABLE table,
const TABLE altered_table,
const dict_table_t dict_table 
)
static

Check if INSTANT ADD/DROP can be done.

Parameters
[in]ha_alter_infoalter info
[in]tableMySQL table before ALTER
[in]altered_tableMySQL table after ALTER
[in]dict_tableInnoDB table definition cache
Returns
true if INSTANT ADD/DROP can be done, false otherwise.

◆ populate_to_be_instant_columns()

template<typename Table >
void Instant_ddl_impl< Table >::populate_to_be_instant_columns
private

Fetch columns which are to be added or dropped instantly.

Member Data Documentation

◆ m_altered_table

template<typename Table >
const TABLE* Instant_ddl_impl< Table >::m_altered_table
private

◆ m_autoinc

template<typename Table >
uint64_t* Instant_ddl_impl< Table >::m_autoinc
private

◆ m_cols_to_add

template<typename Table >
Columns Instant_ddl_impl< Table >::m_cols_to_add
private

◆ m_cols_to_drop

template<typename Table >
Columns Instant_ddl_impl< Table >::m_cols_to_drop
private

◆ m_dict_table

template<typename Table >
dict_table_t* Instant_ddl_impl< Table >::m_dict_table
private

◆ m_ha_alter_info

template<typename Table >
Alter_inplace_info* Instant_ddl_impl< Table >::m_ha_alter_info
private

◆ m_new_dd_tab

template<typename Table >
Table* Instant_ddl_impl< Table >::m_new_dd_tab
private

◆ m_old_dd_tab

template<typename Table >
const Table* Instant_ddl_impl< Table >::m_old_dd_tab
private

◆ m_old_table

template<typename Table >
const TABLE* Instant_ddl_impl< Table >::m_old_table
private

◆ m_thd

template<typename Table >
THD* Instant_ddl_impl< Table >::m_thd
private

◆ m_trx

template<typename Table >
trx_t* Instant_ddl_impl< Table >::m_trx
private

The documentation for this class was generated from the following files: