MySQL 8.0.39
Source Code Documentation
trx_undo_t Struct Reference

Transaction undo log memory object; this is protected by the undo_mutex in the corresponding transaction object. More...

#include <trx0undo.h>

Public Types

enum class  Gtid_storage { NONE , COMMIT , PREPARE_AND_COMMIT }
 Undo log may could be allocated to store transaction GTIDs. More...
 

Public Member Functions

bool gtid_allocated (bool is_prepare) const
 Check if space for GTID is allocated in undo. More...
 
std::tuple< int, size_t > gtid_get_details (bool is_prepare) const
 Get offset and flag for GTID stored in undo. More...
 
void set_prepared (const XID *in_xid)
 
void set_prepared_in_tc ()
 
bool is_prepared () const
 
 UT_LIST_NODE_T (trx_undo_t) undo_list
 undo log objects in the rollback segment are chained into lists More...
 

Public Attributes

ulint id
 undo log slot number within the rollback segment More...
 
ulint type
 TRX_UNDO_INSERT or TRX_UNDO_UPDATE. More...
 
ulint state
 state of the corresponding undo log segment More...
 
bool del_marks
 relevant only in an update undo log: this is true if the transaction may have delete marked records, because of a delete of a row or an update of an indexed field; purge is then necessary; also true if the transaction has updated an externally stored field More...
 
trx_id_t trx_id
 id of the trx assigned to the undo log More...
 
XID xid
 X/Open XA transaction identification. More...
 
ulint flag
 flag for current transaction XID and GTID. More...
 
Gtid_storage m_gtid_storage {Gtid_storage::NONE}
 Storage space allocated for GTIDs. More...
 
bool dict_operation
 true if a dict operation trx More...
 
trx_rseg_trseg
 rseg where the undo log belongs More...
 
space_id_t space
 space id where the undo log placed More...
 
page_size_t page_size
 
page_no_t hdr_page_no
 page number of the header page in the undo log More...
 
ulint hdr_offset
 header offset of the undo log on the page More...
 
page_no_t last_page_no
 page number of the last page in the undo log; this may differ from top_page_no during a rollback More...
 
ulint size
 current size in pages More...
 
ulint empty
 true if the stack of undo log records is currently empty More...
 
page_no_t top_page_no
 page number where the latest undo log record was catenated; during rollback the page from which the latest undo record was chosen More...
 
ulint top_offset
 offset of the latest undo record, i.e., the topmost element in the undo log if we think of it as a stack More...
 
undo_no_t top_undo_no
 undo number of the latest record More...
 
buf_block_tguess_block
 guess for the buffer block where the top page might reside More...
 

Detailed Description

Transaction undo log memory object; this is protected by the undo_mutex in the corresponding transaction object.

Member Enumeration Documentation

◆ Gtid_storage

enum class trx_undo_t::Gtid_storage
strong

Undo log may could be allocated to store transaction GTIDs.

Enumerator
NONE 
COMMIT 
PREPARE_AND_COMMIT 

Member Function Documentation

◆ gtid_allocated()

bool trx_undo_t::gtid_allocated ( bool  is_prepare) const

Check if space for GTID is allocated in undo.

Parameters
[in]is_prepareif XA prepare GTID
Returns
true iff space for GTID is allocated.

◆ gtid_get_details()

std::tuple< int, size_t > trx_undo_t::gtid_get_details ( bool  is_prepare) const

Get offset and flag for GTID stored in undo.

Parameters
[in]is_prepareif XA prepare GTID
Returns
GTID flag and offset in a tuple.

◆ is_prepared()

bool trx_undo_t::is_prepared ( ) const
inline

◆ set_prepared()

void trx_undo_t::set_prepared ( const XID in_xid)
inline

◆ set_prepared_in_tc()

void trx_undo_t::set_prepared_in_tc ( )
inline

◆ UT_LIST_NODE_T()

trx_undo_t::UT_LIST_NODE_T ( trx_undo_t  )

undo log objects in the rollback segment are chained into lists

Member Data Documentation

◆ del_marks

bool trx_undo_t::del_marks

relevant only in an update undo log: this is true if the transaction may have delete marked records, because of a delete of a row or an update of an indexed field; purge is then necessary; also true if the transaction has updated an externally stored field

◆ dict_operation

bool trx_undo_t::dict_operation

true if a dict operation trx

◆ empty

ulint trx_undo_t::empty

true if the stack of undo log records is currently empty

◆ flag

ulint trx_undo_t::flag

flag for current transaction XID and GTID.

Persisted in TRX_UNDO_FLAGS flag of undo header.

◆ guess_block

buf_block_t* trx_undo_t::guess_block

guess for the buffer block where the top page might reside

◆ hdr_offset

ulint trx_undo_t::hdr_offset

header offset of the undo log on the page

◆ hdr_page_no

page_no_t trx_undo_t::hdr_page_no

page number of the header page in the undo log

◆ id

ulint trx_undo_t::id

undo log slot number within the rollback segment

◆ last_page_no

page_no_t trx_undo_t::last_page_no

page number of the last page in the undo log; this may differ from top_page_no during a rollback

◆ m_gtid_storage

Gtid_storage trx_undo_t::m_gtid_storage {Gtid_storage::NONE}

Storage space allocated for GTIDs.

◆ page_size

page_size_t trx_undo_t::page_size

◆ rseg

trx_rseg_t* trx_undo_t::rseg

rseg where the undo log belongs

◆ size

ulint trx_undo_t::size

current size in pages

◆ space

space_id_t trx_undo_t::space

space id where the undo log placed

◆ state

ulint trx_undo_t::state

state of the corresponding undo log segment

◆ top_offset

ulint trx_undo_t::top_offset

offset of the latest undo record, i.e., the topmost element in the undo log if we think of it as a stack

◆ top_page_no

page_no_t trx_undo_t::top_page_no

page number where the latest undo log record was catenated; during rollback the page from which the latest undo record was chosen

◆ top_undo_no

undo_no_t trx_undo_t::top_undo_no

undo number of the latest record

◆ trx_id

trx_id_t trx_undo_t::trx_id

id of the trx assigned to the undo log

◆ type

ulint trx_undo_t::type

TRX_UNDO_INSERT or TRX_UNDO_UPDATE.

◆ xid

XID trx_undo_t::xid

X/Open XA transaction identification.


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