MySQL 9.0.0
Source Code Documentation
Transactional_ddl_context Class Reference

This class keeps the context of transactional DDL statements. More...

#include <sql_class.h>

Public Member Functions

 Transactional_ddl_context (THD *thd)
 
 ~Transactional_ddl_context ()
 
void init (dd::String_type db, dd::String_type tablename, const handlerton *hton)
 Initialize the transactional ddl context when executing CREATE TABLE ... SELECT command with engine which supports atomic DDL. More...
 
bool inited ()
 
void rollback ()
 Remove the table share used while creating the table, if the transaction is being rolledback. More...
 
void post_ddl ()
 End the transactional context created by calling post ddl hook for engine on which table is being created. More...
 

Private Attributes

THDm_thd {nullptr}
 
const handlertonm_hton {nullptr}
 
dd::String_type m_db {}
 
dd::String_type m_tablename {}
 

Detailed Description

This class keeps the context of transactional DDL statements.

Currently only CREATE TABLE with START TRANSACTION uses this context.

Constructor & Destructor Documentation

◆ Transactional_ddl_context()

Transactional_ddl_context::Transactional_ddl_context ( THD thd)
inlineexplicit

◆ ~Transactional_ddl_context()

Transactional_ddl_context::~Transactional_ddl_context ( )
inline

Member Function Documentation

◆ init()

void Transactional_ddl_context::init ( dd::String_type  db,
dd::String_type  tablename,
const handlerton hton 
)

Initialize the transactional ddl context when executing CREATE TABLE ... SELECT command with engine which supports atomic DDL.

Parameters
dbSchema name in which table is being created.
tablenameTable name being created.
htonHandlerton representing engine used for table.

◆ inited()

bool Transactional_ddl_context::inited ( )
inline

◆ post_ddl()

void Transactional_ddl_context::post_ddl ( )

End the transactional context created by calling post ddl hook for engine on which table is being created.

This is done after transaction rollback and commit.

◆ rollback()

void Transactional_ddl_context::rollback ( )

Remove the table share used while creating the table, if the transaction is being rolledback.

Member Data Documentation

◆ m_db

dd::String_type Transactional_ddl_context::m_db {}
private

◆ m_hton

const handlerton* Transactional_ddl_context::m_hton {nullptr}
private

◆ m_tablename

dd::String_type Transactional_ddl_context::m_tablename {}
private

◆ m_thd

THD* Transactional_ddl_context::m_thd {nullptr}
private

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