MySQL 8.0.40
Source Code Documentation
ActiveTranx Class Reference

This class manages memory for active transaction list. More...

#include <semisync_source.h>

Inheritance diagram for ActiveTranx:
[legend]

Public Member Functions

int signal_waiting_sessions_all ()
 
int signal_waiting_sessions_up_to (const char *log_file_name, my_off_t log_file_pos)
 
TranxNodefind_active_tranx_node (const char *log_file_name, my_off_t log_file_pos)
 
 ActiveTranx (mysql_mutex_t *lock, unsigned long trace_level)
 
 ~ActiveTranx ()
 
int insert_tranx_node (const char *log_file_name, my_off_t log_file_pos)
 
int clear_active_tranx_nodes (const char *log_file_name, my_off_t log_file_pos)
 
bool is_tranx_end_pos (const char *log_file_name, my_off_t log_file_pos)
 
bool is_empty ()
 
- Public Member Functions inherited from Trace
void function_enter (const char *func_name)
 
int function_exit (const char *func_name, int exit_code)
 
bool function_exit (const char *func_name, bool exit_code)
 
void function_exit (const char *func_name)
 
 Trace ()
 
 Trace (unsigned long trace_level)
 

Static Public Member Functions

static int compare (const char *log_file_name1, my_off_t log_file_pos1, const char *log_file_name2, my_off_t log_file_pos2)
 

Private Member Functions

void assert_lock_owner ()
 
unsigned int calc_hash (const unsigned char *key, unsigned int length)
 
unsigned int get_hash_value (const char *log_file_name, my_off_t log_file_pos)
 
int compare (const char *log_file_name1, my_off_t log_file_pos1, const TranxNode *node2)
 
int compare (const TranxNode *node1, const char *log_file_name2, my_off_t log_file_pos2)
 
int compare (const TranxNode *node1, const TranxNode *node2)
 

Private Attributes

TranxNodeAllocator allocator_
 
TranxNodetrx_front_
 
TranxNodetrx_rear_
 
TranxNode ** trx_htb_
 
int num_entries_
 
mysql_mutex_tlock_
 

Additional Inherited Members

- Public Attributes inherited from Trace
unsigned long trace_level_
 
- Static Public Attributes inherited from Trace
static const unsigned long kTraceFunction = 0x0040
 
static const unsigned long kTraceGeneral = 0x0001
 
static const unsigned long kTraceDetail = 0x0010
 
static const unsigned long kTraceNetWait = 0x0020
 

Detailed Description

This class manages memory for active transaction list.

We record each active transaction with a TranxNode, each session can have only one open transaction. Because of EVENT, the total active transaction nodes can exceed the maximum allowed connections.

Constructor & Destructor Documentation

◆ ActiveTranx()

ActiveTranx::ActiveTranx ( mysql_mutex_t lock,
unsigned long  trace_level 
)

◆ ~ActiveTranx()

ActiveTranx::~ActiveTranx ( )

Member Function Documentation

◆ assert_lock_owner()

void ActiveTranx::assert_lock_owner ( )
inlineprivate

◆ calc_hash()

unsigned int ActiveTranx::calc_hash ( const unsigned char *  key,
unsigned int  length 
)
inlineprivate

◆ clear_active_tranx_nodes()

int ActiveTranx::clear_active_tranx_nodes ( const char *  log_file_name,
my_off_t  log_file_pos 
)

◆ compare() [1/4]

int ActiveTranx::compare ( const char *  log_file_name1,
my_off_t  log_file_pos1,
const char *  log_file_name2,
my_off_t  log_file_pos2 
)
static

◆ compare() [2/4]

int ActiveTranx::compare ( const char *  log_file_name1,
my_off_t  log_file_pos1,
const TranxNode node2 
)
inlineprivate

◆ compare() [3/4]

int ActiveTranx::compare ( const TranxNode node1,
const char *  log_file_name2,
my_off_t  log_file_pos2 
)
inlineprivate

◆ compare() [4/4]

int ActiveTranx::compare ( const TranxNode node1,
const TranxNode node2 
)
inlineprivate

◆ find_active_tranx_node()

TranxNode * ActiveTranx::find_active_tranx_node ( const char *  log_file_name,
my_off_t  log_file_pos 
)

◆ get_hash_value()

unsigned int ActiveTranx::get_hash_value ( const char *  log_file_name,
my_off_t  log_file_pos 
)
private

◆ insert_tranx_node()

int ActiveTranx::insert_tranx_node ( const char *  log_file_name,
my_off_t  log_file_pos 
)

◆ is_empty()

bool ActiveTranx::is_empty ( )
inline

◆ is_tranx_end_pos()

bool ActiveTranx::is_tranx_end_pos ( const char *  log_file_name,
my_off_t  log_file_pos 
)

◆ signal_waiting_sessions_all()

int ActiveTranx::signal_waiting_sessions_all ( )

◆ signal_waiting_sessions_up_to()

int ActiveTranx::signal_waiting_sessions_up_to ( const char *  log_file_name,
my_off_t  log_file_pos 
)

Member Data Documentation

◆ allocator_

TranxNodeAllocator ActiveTranx::allocator_
private

◆ lock_

mysql_mutex_t* ActiveTranx::lock_
private

◆ num_entries_

int ActiveTranx::num_entries_
private

◆ trx_front_

TranxNode* ActiveTranx::trx_front_
private

◆ trx_htb_

TranxNode** ActiveTranx::trx_htb_
private

◆ trx_rear_

TranxNode * ActiveTranx::trx_rear_
private

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