MySQL 8.0.40
Source Code Documentation
trx0trx.ic File Reference

The transaction. More...

#include "read0read.h"

Functions

static bool trx_state_eq (const trx_t *trx, trx_state_t state)
 
static const dict_index_ttrx_get_error_index (const trx_t *trx)
 Retrieves the index causing error from a trx. More...
 
static const char * trx_get_que_state_str (const trx_t *trx)
 Retrieves transaction's que state in a human readable string. More...
 
static trx_id_t trx_get_id_for_print (const trx_t *trx)
 Retreieves the transaction ID. More...
 
static enum trx_dict_op_t trx_get_dict_operation (const trx_t *trx)
 Determine if a transaction is a dictionary operation. More...
 
static void trx_set_dict_operation (trx_t *trx, enum trx_dict_op_t op)
 Flag a transaction a dictionary operation. More...
 
static bool trx_is_redo_rseg_updated (const trx_t *trx)
 Check if redo rseg is modified for insert/update. More...
 
static bool trx_is_temp_rseg_updated (const trx_t *trx)
 Check if noredo rseg is modified for insert/update. More...
 
static bool trx_is_rseg_updated (const trx_t *trx)
 Check if redo/noredo rseg is modified for insert/update. More...
 
static bool trx_is_rseg_assigned (const trx_t *trx)
 Check if redo/nonredo rseg is valid. More...
 
static void trx_reference (trx_t *trx)
 
static void trx_release_reference (trx_t *trx)
 Release the transaction. More...
 
static ReadViewtrx_get_read_view (trx_t *trx)
 
static const ReadViewtrx_get_read_view (const trx_t *trx)
 
static bool trx_is_high_priority (const trx_t *trx)
 
static const trx_ttrx_arbitrate (const trx_t *requestor, const trx_t *holder)
 

Detailed Description

The transaction.

Created 3/26/1996 Heikki Tuuri

Function Documentation

◆ trx_arbitrate()

static const trx_t * trx_arbitrate ( const trx_t requestor,
const trx_t holder 
)
inlinestatic
Parameters
[in]requestorTransaction requesting the lock
[in]holderTransaction holding the lock
Returns
the transaction that will be rolled back, null don't care

◆ trx_get_dict_operation()

static enum trx_dict_op_t trx_get_dict_operation ( const trx_t trx)
inlinestatic

Determine if a transaction is a dictionary operation.

Returns
dictionary operation mode
Parameters
trxin: transaction

◆ trx_get_error_index()

static const dict_index_t * trx_get_error_index ( const trx_t trx)
inlinestatic

Retrieves the index causing error from a trx.

Parameters
[in]trxtrx object
Returns
the error index

◆ trx_get_id_for_print()

static trx_id_t trx_get_id_for_print ( const trx_t trx)
inlinestatic

Retreieves the transaction ID.

In a given point in time it is guaranteed that IDs of the running transactions are unique. The values returned by this function for readonly transactions may be reused, so a subsequent RO transaction may get the same ID as a RO transaction that existed in the past. The values returned by this function should be used for printing purposes only.

Parameters
[in]trxtransaction whose id to retrieve
Returns
transaction id

◆ trx_get_que_state_str()

static const char * trx_get_que_state_str ( const trx_t trx)
inlinestatic

Retrieves transaction's que state in a human readable string.

The string should not be free()'d or modified.

Returns
string in the data segment
Parameters
trxin: transaction

◆ trx_get_read_view() [1/2]

static const ReadView * trx_get_read_view ( const trx_t trx)
inlinestatic
Parameters
trxGet the active view for this transaction, if one exists
Returns
the transaction's read view or NULL if one not assigned.

◆ trx_get_read_view() [2/2]

static ReadView * trx_get_read_view ( trx_t trx)
inlinestatic
Parameters
trxGet the active view for this transaction, if one exists
Returns
the transaction's read view or NULL if one not assigned.

◆ trx_is_high_priority()

static bool trx_is_high_priority ( const trx_t trx)
inlinestatic
Parameters
[in]trxTransaction to check
Returns
true if the transaction is a high priority transaction.

◆ trx_is_redo_rseg_updated()

static bool trx_is_redo_rseg_updated ( const trx_t trx)
inlinestatic

Check if redo rseg is modified for insert/update.

Parameters
trxin: transaction

◆ trx_is_rseg_assigned()

static bool trx_is_rseg_assigned ( const trx_t trx)
inlinestatic

Check if redo/nonredo rseg is valid.

Parameters
trxin: transaction

◆ trx_is_rseg_updated()

static bool trx_is_rseg_updated ( const trx_t trx)
inlinestatic

Check if redo/noredo rseg is modified for insert/update.

Parameters
trxin: transaction

◆ trx_is_temp_rseg_updated()

static bool trx_is_temp_rseg_updated ( const trx_t trx)
inlinestatic

Check if noredo rseg is modified for insert/update.

Parameters
trxin: transaction

◆ trx_reference()

static void trx_reference ( trx_t trx)
inlinestatic

◆ trx_release_reference()

static void trx_release_reference ( trx_t trx)
inlinestatic

Release the transaction.

Decrease the reference count.

Parameters
trxTransaction that is being released

◆ trx_set_dict_operation()

static void trx_set_dict_operation ( trx_t trx,
enum trx_dict_op_t  op 
)
inlinestatic

Flag a transaction a dictionary operation.

Parameters
trxin/out: transaction
opin: operation, not TRX_DICT_OP_NONE

◆ trx_state_eq()

static bool trx_state_eq ( const trx_t trx,
trx_state_t  state 
)
inlinestatic