MySQL 8.4.2
Source Code Documentation
Transaction_ctx Class Reference

#include <transaction_info.h>

Classes

struct  THD_TRANS
 

Public Types

enum  enum_trx_scope { STMT = 0 , SESSION }
 

Public Member Functions

void register_ha (enum_trx_scope scope, Ha_trx_info *ha_info, handlerton *ht)
 
void store_commit_parent (int64 last_arg)
 
 Transaction_ctx ()
 
virtual ~Transaction_ctx ()
 
void cleanup ()
 
bool is_active (enum_trx_scope scope) const
 
void push_unsafe_rollback_warnings (THD *thd)
 
void merge_unsafe_rollback_flags ()
 
void init_mem_root_defaults (ulong trans_alloc_block_size, ulong)
 
MEM_ROOTtransaction_memroot ()
 
void * allocate_memory (unsigned int size)
 
void claim_memory_ownership (bool claim)
 
void free_memory ()
 
char * strmake (const char *str, size_t len)
 
void invalidate_changed_tables_in_cache (THD *thd)
 
void add_changed_table (const char *key, uint32 key_length)
 
Ha_trx_info_list ha_trx_info (enum_trx_scope scope)
 
void set_ha_trx_info (enum_trx_scope scope, Ha_trx_info *trx_info)
 
XID_STATExid_state ()
 
const XID_STATExid_state () const
 
bool cannot_safely_rollback (enum_trx_scope scope) const
 
unsigned int get_unsafe_rollback_flags (enum_trx_scope scope) const
 
void set_unsafe_rollback_flags (enum_trx_scope scope, unsigned int flags)
 
void add_unsafe_rollback_flags (enum_trx_scope scope, unsigned int flags)
 
void reset_unsafe_rollback_flags (enum_trx_scope scope)
 
void mark_modified_non_trans_table (enum_trx_scope scope)
 
bool has_modified_non_trans_table (enum_trx_scope scope) const
 
void mark_created_temp_table (enum_trx_scope scope)
 
bool has_created_temp_table (enum_trx_scope scope) const
 
void mark_dropped_temp_table (enum_trx_scope scope)
 
bool has_dropped_temp_table (enum_trx_scope scope) const
 
void reset (enum_trx_scope scope)
 
bool is_empty (enum_trx_scope scope) const
 
void set_no_2pc (enum_trx_scope scope, bool value)
 
bool no_2pc (enum_trx_scope scope) const
 
int rw_ha_count (enum_trx_scope scope) const
 
void set_rw_ha_count (enum_trx_scope scope, int value)
 
void reset_scope (enum_trx_scope scope)
 
Rpl_transaction_ctxget_rpl_transaction_ctx ()
 
const Rpl_transaction_ctxget_rpl_transaction_ctx () const
 
Rpl_transaction_write_set_ctxget_transaction_write_set_ctx ()
 
const Rpl_transaction_write_set_ctxget_transaction_write_set_ctx () const
 
bool was_trans_begin_hook_invoked ()
 
void set_trans_begin_hook_invoked ()
 

Public Attributes

SAVEPOINTm_savepoints
 
struct {
   bool   enabled {false}
 
   bool   xid_written {false}
 
   bool   real_commit {false}
 
   bool   commit_low {false}
 
   bool   run_hooks {false}
 
   bool   ready_preempt {false}
 
m_flags
 
int64 last_committed
 
int64 sequence_number
 

Private Attributes

THD_TRANS m_scope_info [2]
 
XID_STATE m_xid_state
 
MEM_ROOT m_mem_root
 
Rpl_transaction_ctx m_rpl_transaction_ctx
 
Rpl_transaction_write_set_ctx m_transaction_write_set_ctx
 
bool trans_begin_hook_invoked
 

Member Enumeration Documentation

◆ enum_trx_scope

Enumerator
STMT 
SESSION 

Constructor & Destructor Documentation

◆ Transaction_ctx()

Transaction_ctx::Transaction_ctx ( )

◆ ~Transaction_ctx()

virtual Transaction_ctx::~Transaction_ctx ( )
inlinevirtual

Member Function Documentation

◆ add_changed_table()

void Transaction_ctx::add_changed_table ( const char *  key,
uint32  key_length 
)

◆ add_unsafe_rollback_flags()

void Transaction_ctx::add_unsafe_rollback_flags ( enum_trx_scope  scope,
unsigned int  flags 
)
inline

◆ allocate_memory()

void * Transaction_ctx::allocate_memory ( unsigned int  size)
inline

◆ cannot_safely_rollback()

bool Transaction_ctx::cannot_safely_rollback ( enum_trx_scope  scope) const
inline

◆ claim_memory_ownership()

void Transaction_ctx::claim_memory_ownership ( bool  claim)
inline

◆ cleanup()

void Transaction_ctx::cleanup ( void  )
inline

◆ free_memory()

void Transaction_ctx::free_memory ( )
inline

◆ get_rpl_transaction_ctx() [1/2]

Rpl_transaction_ctx * Transaction_ctx::get_rpl_transaction_ctx ( )
inline

◆ get_rpl_transaction_ctx() [2/2]

const Rpl_transaction_ctx * Transaction_ctx::get_rpl_transaction_ctx ( ) const
inline

◆ get_transaction_write_set_ctx() [1/2]

Rpl_transaction_write_set_ctx * Transaction_ctx::get_transaction_write_set_ctx ( )
inline

◆ get_transaction_write_set_ctx() [2/2]

const Rpl_transaction_write_set_ctx * Transaction_ctx::get_transaction_write_set_ctx ( ) const
inline

◆ get_unsafe_rollback_flags()

unsigned int Transaction_ctx::get_unsafe_rollback_flags ( enum_trx_scope  scope) const
inline

◆ ha_trx_info()

Ha_trx_info_list Transaction_ctx::ha_trx_info ( enum_trx_scope  scope)

◆ has_created_temp_table()

bool Transaction_ctx::has_created_temp_table ( enum_trx_scope  scope) const
inline

◆ has_dropped_temp_table()

bool Transaction_ctx::has_dropped_temp_table ( enum_trx_scope  scope) const
inline

◆ has_modified_non_trans_table()

bool Transaction_ctx::has_modified_non_trans_table ( enum_trx_scope  scope) const
inline

◆ init_mem_root_defaults()

void Transaction_ctx::init_mem_root_defaults ( ulong  trans_alloc_block_size,
ulong   
)
inline

◆ invalidate_changed_tables_in_cache()

void Transaction_ctx::invalidate_changed_tables_in_cache ( THD thd)

◆ is_active()

bool Transaction_ctx::is_active ( enum_trx_scope  scope) const
inline

◆ is_empty()

bool Transaction_ctx::is_empty ( enum_trx_scope  scope) const
inline

◆ mark_created_temp_table()

void Transaction_ctx::mark_created_temp_table ( enum_trx_scope  scope)
inline

◆ mark_dropped_temp_table()

void Transaction_ctx::mark_dropped_temp_table ( enum_trx_scope  scope)
inline

◆ mark_modified_non_trans_table()

void Transaction_ctx::mark_modified_non_trans_table ( enum_trx_scope  scope)
inline

◆ merge_unsafe_rollback_flags()

void Transaction_ctx::merge_unsafe_rollback_flags ( )
inline

◆ no_2pc()

bool Transaction_ctx::no_2pc ( enum_trx_scope  scope) const
inline

◆ push_unsafe_rollback_warnings()

void Transaction_ctx::push_unsafe_rollback_warnings ( THD thd)

◆ register_ha()

void Transaction_ctx::register_ha ( enum_trx_scope  scope,
Ha_trx_info ha_info,
handlerton ht 
)

◆ reset()

void Transaction_ctx::reset ( enum_trx_scope  scope)
inline

◆ reset_scope()

void Transaction_ctx::reset_scope ( enum_trx_scope  scope)
inline

◆ reset_unsafe_rollback_flags()

void Transaction_ctx::reset_unsafe_rollback_flags ( enum_trx_scope  scope)
inline

◆ rw_ha_count()

int Transaction_ctx::rw_ha_count ( enum_trx_scope  scope) const
inline

◆ set_ha_trx_info()

void Transaction_ctx::set_ha_trx_info ( enum_trx_scope  scope,
Ha_trx_info trx_info 
)
inline

◆ set_no_2pc()

void Transaction_ctx::set_no_2pc ( enum_trx_scope  scope,
bool  value 
)
inline

◆ set_rw_ha_count()

void Transaction_ctx::set_rw_ha_count ( enum_trx_scope  scope,
int  value 
)
inline

◆ set_trans_begin_hook_invoked()

void Transaction_ctx::set_trans_begin_hook_invoked ( )
inline

◆ set_unsafe_rollback_flags()

void Transaction_ctx::set_unsafe_rollback_flags ( enum_trx_scope  scope,
unsigned int  flags 
)
inline

◆ store_commit_parent()

void Transaction_ctx::store_commit_parent ( int64  last_arg)
inline

◆ strmake()

char * Transaction_ctx::strmake ( const char *  str,
size_t  len 
)
inline

◆ transaction_memroot()

MEM_ROOT * Transaction_ctx::transaction_memroot ( )
inline

◆ was_trans_begin_hook_invoked()

bool Transaction_ctx::was_trans_begin_hook_invoked ( )
inline

◆ xid_state() [1/2]

XID_STATE * Transaction_ctx::xid_state ( )
inline

◆ xid_state() [2/2]

const XID_STATE * Transaction_ctx::xid_state ( ) const
inline

Member Data Documentation

◆ commit_low

bool Transaction_ctx::commit_low {false}

◆ enabled

bool Transaction_ctx::enabled {false}

◆ last_committed

int64 Transaction_ctx::last_committed

◆ 

struct { ... } Transaction_ctx::m_flags

◆ m_mem_root

MEM_ROOT Transaction_ctx::m_mem_root
private

◆ m_rpl_transaction_ctx

Rpl_transaction_ctx Transaction_ctx::m_rpl_transaction_ctx
private

◆ m_savepoints

SAVEPOINT* Transaction_ctx::m_savepoints

◆ m_scope_info

THD_TRANS Transaction_ctx::m_scope_info[2]
private

◆ m_transaction_write_set_ctx

Rpl_transaction_write_set_ctx Transaction_ctx::m_transaction_write_set_ctx
private

◆ m_xid_state

XID_STATE Transaction_ctx::m_xid_state
private

◆ ready_preempt

bool Transaction_ctx::ready_preempt {false}

◆ real_commit

bool Transaction_ctx::real_commit {false}

◆ run_hooks

bool Transaction_ctx::run_hooks {false}

◆ sequence_number

int64 Transaction_ctx::sequence_number

◆ trans_begin_hook_invoked

bool Transaction_ctx::trans_begin_hook_invoked
private

◆ xid_written

bool Transaction_ctx::xid_written {false}

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