MySQL  8.0.15
Source Code Documentation
THD::Transaction_state Struct Reference

An utility struct for Attachable_trx. More...

Public Member Functions

 Transaction_state ()
 ~Transaction_state ()
void backup (THD *thd)
void restore (THD *thd)

Public Attributes

enum_sql_command m_sql_command
 SQL-command. More...
Open_tables_backup m_open_tables_state
 Open-tables state. More...
sql_mode_t m_sql_mode
 SQL_MODE. More...
enum_tx_isolation m_tx_isolation
 Transaction isolation level. More...
Prealloced_array< Ha_data, PREALLOC_NUM_HAm_ha_data
 Ha_data array. More...
 Transaction_ctx instance. More...
bool m_tx_read_only
 Transaction read-only state. More...
ulonglong m_thd_option_bits
 THD options. More...
 Current transaction instrumentation. More...
uint m_server_status
 Server status flags. More...
bool m_in_lock_tables
 THD::in_lock_tables value. More...
bool m_time_zone_used
 Current time zone (i.e. More...
bool m_transaction_rollback_request
 Transaction rollback request flag. More...

Detailed Description

An utility struct for Attachable_trx.

Constructor & Destructor Documentation

◆ Transaction_state()

THD::Transaction_state::Transaction_state ( )

◆ ~Transaction_state()

THD::Transaction_state::~Transaction_state ( )

Member Function Documentation

◆ backup()

void THD::Transaction_state::backup ( THD thd)

◆ restore()

void THD::Transaction_state::restore ( THD thd)

Member Data Documentation

◆ m_ha_data

Prealloced_array<Ha_data, PREALLOC_NUM_HA> THD::Transaction_state::m_ha_data

Ha_data array.

◆ m_in_lock_tables

bool THD::Transaction_state::m_in_lock_tables

THD::in_lock_tables value.

◆ m_open_tables_state

Open_tables_backup THD::Transaction_state::m_open_tables_state

Open-tables state.

◆ m_query_tables_list

Query_tables_list* THD::Transaction_state::m_query_tables_list

◆ m_server_status

uint THD::Transaction_state::m_server_status

Server status flags.

◆ m_sql_command

enum_sql_command THD::Transaction_state::m_sql_command


◆ m_sql_mode

sql_mode_t THD::Transaction_state::m_sql_mode


◆ m_thd_option_bits

ulonglong THD::Transaction_state::m_thd_option_bits

THD options.

◆ m_time_zone_used

bool THD::Transaction_state::m_time_zone_used

Current time zone (i.e.

@session.time_zone) usage indicator.

Saving it allows data-dictionary code to read timestamp values as datetimes from system tables without disturbing user's statement.

TODO: We need to change DD code not to use @session.time_zone at all and stick to UTC for internal storage of timestamps in DD objects.

◆ m_transaction_psi

PSI_transaction_locker* THD::Transaction_state::m_transaction_psi

Current transaction instrumentation.

◆ m_transaction_rollback_request

bool THD::Transaction_state::m_transaction_rollback_request

Transaction rollback request flag.

InnoDB can try to access table definition while rolling back regular transaction. So we need to be able to start attachable transaction without being affected by, and affecting, the rollback state of regular transaction.

◆ m_trx

Transaction_ctx* THD::Transaction_state::m_trx

Transaction_ctx instance.

◆ m_tx_isolation

enum_tx_isolation THD::Transaction_state::m_tx_isolation

Transaction isolation level.

◆ m_tx_read_only

bool THD::Transaction_state::m_tx_read_only

Transaction read-only state.

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