MySQL 9.0.0
Source Code Documentation
session_tracker.h File Reference
#include <stddef.h>
#include <sys/types.h>
#include "lex_string.h"
#include "thr_lock.h"

Go to the source code of this file.

Classes

class  State_tracker
 
class  Session_tracker
 
class  Session_state_change_tracker
 
class  Transaction_state_tracker
 

Macros

#define SESSION_TRACKER_END   TRACK_TRANSACTION_STATE
 
#define TX_TRACKER_GET(a)
 

Enumerations

enum  enum_session_tracker {
  SESSION_SYSVARS_TRACKER , CURRENT_SCHEMA_TRACKER , SESSION_STATE_CHANGE_TRACKER , SESSION_GTIDS_TRACKER ,
  TRANSACTION_INFO_TRACKER , TRACK_TRANSACTION_STATE
}
 
enum  enum_tx_state {
  TX_EMPTY = 0 , TX_EXPLICIT = 1 , TX_IMPLICIT = 2 , TX_READ_TRX = 4 ,
  TX_READ_UNSAFE = 8 , TX_WRITE_TRX = 16 , TX_WRITE_UNSAFE = 32 , TX_STMT_UNSAFE = 64 ,
  TX_RESULT_SET = 128 , TX_WITH_SNAPSHOT = 256 , TX_LOCKED_TABLES = 512 , TX_STMT_DML = 1024 ,
  TX_STMT_DDL = 2048
}
 Transaction state (no transaction, transaction active, work attached, etc.) More...
 
enum  enum_tx_read_flags { TX_READ_INHERIT = 0 , TX_READ_ONLY = 1 , TX_READ_WRITE = 2 }
 Transaction access mode. More...
 
enum  enum_tx_isol_level {
  TX_ISOL_INHERIT = 0 , TX_ISOL_UNCOMMITTED = 1 , TX_ISOL_COMMITTED = 2 , TX_ISOL_REPEATABLE = 3 ,
  TX_ISOL_SERIALIZABLE = 4
}
 Transaction isolation level. More...
 
enum  enum_session_track_transaction_info { TX_TRACK_NONE = 0 , TX_TRACK_STATE = 1 , TX_TRACK_CHISTICS = 2 }
 Transaction tracking level. More...
 

Macro Definition Documentation

◆ SESSION_TRACKER_END

#define SESSION_TRACKER_END   TRACK_TRANSACTION_STATE

◆ TX_TRACKER_GET

#define TX_TRACKER_GET (   a)
Value:
(Transaction_state_tracker *)thd->session_tracker.get_tracker( \
Definition: session_tracker.h:255
@ TRANSACTION_INFO_TRACKER
Definition: session_tracker.h:44

Enumeration Type Documentation

◆ enum_session_track_transaction_info

Transaction tracking level.

Enumerator
TX_TRACK_NONE 

do not send tracker items on transaction info

TX_TRACK_STATE 

track transaction status

TX_TRACK_CHISTICS 

track status and characteristics

◆ enum_session_tracker

Enumerator
SESSION_SYSVARS_TRACKER 
CURRENT_SCHEMA_TRACKER 
SESSION_STATE_CHANGE_TRACKER 
SESSION_GTIDS_TRACKER 
TRANSACTION_INFO_TRACKER 
TRACK_TRANSACTION_STATE 

◆ enum_tx_isol_level

Transaction isolation level.

Enumerator
TX_ISOL_INHERIT 

not explicitly set, inherit session.tx_isolation

TX_ISOL_UNCOMMITTED 
TX_ISOL_COMMITTED 
TX_ISOL_REPEATABLE 
TX_ISOL_SERIALIZABLE 

◆ enum_tx_read_flags

Transaction access mode.

Enumerator
TX_READ_INHERIT 

not explicitly set, inherit session.tx_read_only

TX_READ_ONLY 

START TRANSACTION READ ONLY, or tx_read_only=1.

TX_READ_WRITE 

START TRANSACTION READ WRITE, or tx_read_only=0.

◆ enum_tx_state

Transaction state (no transaction, transaction active, work attached, etc.)

Transaction_state_tracker

This is a tracker class that enables & manages the tracking of current transaction info for a particular connection.

Enumerator
TX_EMPTY 

"none of the below"

TX_EXPLICIT 

an explicit transaction is active

TX_IMPLICIT 

an implicit transaction is active

TX_READ_TRX 

transactional reads were done

TX_READ_UNSAFE 

non-transaction reads were done

TX_WRITE_TRX 

transactional writes were done

TX_WRITE_UNSAFE 

non-transactional writes were done

TX_STMT_UNSAFE 

"unsafe" (non-deterministic like UUID()) stmts

TX_RESULT_SET 

result-set was sent

TX_WITH_SNAPSHOT 

WITH CONSISTENT SNAPSHOT was used.

TX_LOCKED_TABLES 

LOCK TABLES is active.

TX_STMT_DML 

a DML statement (known before data is accessed)

TX_STMT_DDL 

a DDL statement