MySQL 8.4.0
Source Code Documentation
Gtid_table_access_context Class Reference

#include <rpl_gtid_persist.h>

Inheritance diagram for Gtid_table_access_context:
[legend]

Public Member Functions

 Gtid_table_access_context ()
 
 ~Gtid_table_access_context () override=default
 
bool init (THD **thd, TABLE **table, bool is_write)
 Initialize the gtid_executed table access context as following: More...
 
bool deinit (THD *thd, TABLE *table, bool error, bool need_commit)
 De-initialize the gtid_executed table access context as following: More...
 
void before_open (THD *thd) override
 Prepares before opening table. More...
 
THDcreate_thd ()
 Creates a new thread in the bootstrap process or in the mysqld startup, a thread is created in order to be able to access a table. More...
 
void drop_thd (THD *thd)
 
- Public Member Functions inherited from System_table_access
virtual ~System_table_access ()=default
 
bool open_table (THD *thd, const LEX_CSTRING dbstr, const LEX_CSTRING tbstr, uint max_num_field, enum thr_lock_type lock_type, TABLE **table, Open_tables_backup *backup)
 Opens and locks a system table. More...
 
bool open_table (THD *thd, std::string dbstr, std::string tbstr, uint max_num_field, enum thr_lock_type lock_type, TABLE **table, Open_tables_backup *backup)
 Opens and locks a system table. More...
 
bool close_table (THD *thd, TABLE *table, Open_tables_backup *backup, bool error, bool need_commit)
 Commits the changes, unlocks the table and closes it. More...
 
THDcreate_thd ()
 Creates a new thread in the bootstrap process or in the mysqld startup, a thread is created in order to be able to access a table. More...
 
void drop_thd (THD *thd)
 Destroys the created thread and restores the system_thread information. More...
 

Static Public Attributes

static const LEX_CSTRING DB_NAME
 
static const LEX_CSTRING TABLE_NAME
 

Private Member Functions

Gtid_table_access_contextoperator= (const Gtid_table_access_context &info)
 
 Gtid_table_access_context (const Gtid_table_access_context &info)
 

Private Attributes

THDm_drop_thd_object
 
bool m_is_write
 
Open_tables_backup m_backup
 
ulonglong m_tmp_disable_binlog__save_options
 
bool m_skip_readonly_set {false}
 

Additional Inherited Members

- Public Attributes inherited from System_table_access
uint m_flags
 

Constructor & Destructor Documentation

◆ Gtid_table_access_context() [1/2]

Gtid_table_access_context::Gtid_table_access_context ( )
inline

◆ ~Gtid_table_access_context()

Gtid_table_access_context::~Gtid_table_access_context ( )
overridedefault

◆ Gtid_table_access_context() [2/2]

Gtid_table_access_context::Gtid_table_access_context ( const Gtid_table_access_context info)
private

Member Function Documentation

◆ before_open()

void Gtid_table_access_context::before_open ( THD thd)
overridevirtual

Prepares before opening table.

  • set flags
Parameters
[in]thdThread requesting to open the table

Implements System_table_access.

◆ create_thd()

THD * Gtid_table_access_context::create_thd ( )

Creates a new thread in the bootstrap process or in the mysqld startup, a thread is created in order to be able to access a table.

And reset a new "statement".

Returns
THD* Pointer to thread structure

◆ deinit()

bool Gtid_table_access_context::deinit ( THD thd,
TABLE table,
bool  error,
bool  need_commit 
)

De-initialize the gtid_executed table access context as following:

  • Close the table
  • Re-enable binlog if needed
  • Destroy the created THD if needed.
Parameters
thdThread requesting to close the table
tableTable to be closed
errorIf there was an error while updating the table
need_commitNeed to commit current transaction if it is true
Return values
truefailed
falsesuccess

◆ drop_thd()

void Gtid_table_access_context::drop_thd ( THD thd)

◆ init()

bool Gtid_table_access_context::init ( THD **  thd,
TABLE **  table,
bool  is_write 
)

Initialize the gtid_executed table access context as following:

  • Create a new THD if current_thd is NULL
  • Disable binlog temporarily if we are going to modify the table
  • Open and lock a table.
Parameters
[in,out]thdThread requesting to open the table
[out]tableWe will store the open table here
[in]is_writeIf true, the access will be for modifying the table
Return values
truefailed
falsesuccess

◆ operator=()

Gtid_table_access_context & Gtid_table_access_context::operator= ( const Gtid_table_access_context info)
private

Member Data Documentation

◆ DB_NAME

const LEX_CSTRING Gtid_table_access_context::DB_NAME
static
Initial value:
= {
STRING_WITH_LEN("mysql")}
#define STRING_WITH_LEN(X)
Definition: string_with_len.h:29

◆ m_backup

Open_tables_backup Gtid_table_access_context::m_backup
private

◆ m_drop_thd_object

THD* Gtid_table_access_context::m_drop_thd_object
private

◆ m_is_write

bool Gtid_table_access_context::m_is_write
private

◆ m_skip_readonly_set

bool Gtid_table_access_context::m_skip_readonly_set {false}
private

◆ m_tmp_disable_binlog__save_options

ulonglong Gtid_table_access_context::m_tmp_disable_binlog__save_options
private

◆ TABLE_NAME

const LEX_CSTRING Gtid_table_access_context::TABLE_NAME
static
Initial value:
= {
STRING_WITH_LEN("gtid_executed")}

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