MySQL 8.0.39
Source Code Documentation
purge_node_t Struct Reference

#include <row0purge.h>

Classes

struct  rec_t
 Info required to purge a record. More...
 

Public Types

using Recs = std::list< rec_t, mem_heap_allocator< rec_t > >
 

Public Member Functions

void init ()
 
void deinit ()
 
void add_lob_page (dict_index_t *index, const page_id_t &page_id)
 Add an LOB page to the list of pages that will be freed at the end of a purge batch. More...
 
void free_lob_pages ()
 Free the LOB first pages at end of purge batch. More...
 
bool is_table_id_exists (table_id_t table_id) const
 Check if undo records of given table_id is there in this purge node. More...
 
bool check_duplicate_undo_no () const
 Check if there are more than one undo record with same (trx_id, undo_no) combination. More...
 
bool validate_pcur ()
 Validate the persistent cursor. More...
 

Public Attributes

que_common_t common
 node type: QUE_NODE_PURGE More...
 
roll_ptr_t roll_ptr
 roll pointer to undo log record More...
 
undo_no_t undo_no
 undo number of the record More...
 
ulint rec_type
 undo log record type: TRX_UNDO_INSERT_REC, ... More...
 
dict_table_ttable
 table where purge is done More...
 
MDL_ticketmdl
 MDL ticket for the table name. More...
 
dict_table_tparent
 parent table for an FTS AUX TABLE More...
 
MDL_ticketparent_mdl
 MDL ticket for the parent table of an FTS AUX TABLE. More...
 
TABLEmysql_table
 MySQL table instance. More...
 
ulint cmpl_info
 compiler analysis info of an update More...
 
upd_tupdate
 update vector for a clustered index record More...
 
dtuple_tref
 NULL, or row reference to the next row to handle. More...
 
dtuple_trow
 NULL, or a copy (also fields copied to heap) of the indexed fields of the row to handle. More...
 
dict_index_tindex
 NULL, or the next index whose record should be handled. More...
 
mem_heap_theap
 The heap is owned by purge_sys and is reset after a purge batch has completed. More...
 
bool found_clust
 true if the clustered index record determined by ref was found in the clustered index, and we were able to position pcur on it More...
 
btr_pcur_t pcur
 persistent cursor used in searching the clustered index record More...
 
bool done
 Debug flag. More...
 
trx_id_t trx_id
 trx id for this purging record More...
 
trx_id_t modifier_trx_id
 trx id for this purging record More...
 
Recsrecs
 Undo recs to purge. More...
 
trx_rseg_trseg
 

Private Types

using LOB_free_set = std::set< Page_free_tuple, Compare_page_free_tuple, ut::allocator< Page_free_tuple > >
 

Private Attributes

LOB_free_set m_lob_pages
 Set of LOB first pages that are to be freed. More...
 

Member Typedef Documentation

◆ LOB_free_set

◆ Recs

Member Function Documentation

◆ add_lob_page()

void purge_node_t::add_lob_page ( dict_index_t index,
const page_id_t page_id 
)

Add an LOB page to the list of pages that will be freed at the end of a purge batch.

Parameters
[in]indexthe clust index to which the LOB belongs.
[in]page_idthe page_id of the first page of the LOB.

◆ check_duplicate_undo_no()

bool purge_node_t::check_duplicate_undo_no ( ) const

Check if there are more than one undo record with same (trx_id, undo_no) combination.

Returns
true when no duplicates are found, false otherwise.

◆ deinit()

void purge_node_t::deinit ( void  )
inline

◆ free_lob_pages()

void purge_node_t::free_lob_pages ( )

Free the LOB first pages at end of purge batch.

Since this function acquires shared MDL table locks, the caller should not hold any latches.

Ensure that the caller does not hold any latches.

◆ init()

void purge_node_t::init ( void  )
inline

◆ is_table_id_exists()

bool purge_node_t::is_table_id_exists ( table_id_t  table_id) const

Check if undo records of given table_id is there in this purge node.

Parameters
[in]table_idlook for undo records of this table id.
Returns
true if undo records of table id exists, false otherwise.

◆ validate_pcur()

bool purge_node_t::validate_pcur ( )

Validate the persistent cursor.

Validate the persisent cursor.

The purge node has two references to the clustered index record - one via the ref member, and the other via the persistent cursor. These two references must match each other if the found_clust flag is set.

Returns
true if the persistent cursor is consistent with the ref member.

The purge node has two references to the clustered index record - one via the ref member, and the other via the persistent cursor. These two references must match each other if the found_clust flag is set.

Returns
true if the stored copy of persistent cursor is consistent with the ref member.

Member Data Documentation

◆ cmpl_info

ulint purge_node_t::cmpl_info

compiler analysis info of an update

◆ common

que_common_t purge_node_t::common

node type: QUE_NODE_PURGE

◆ done

bool purge_node_t::done

Debug flag.

◆ found_clust

bool purge_node_t::found_clust

true if the clustered index record determined by ref was found in the clustered index, and we were able to position pcur on it

◆ heap

mem_heap_t* purge_node_t::heap

The heap is owned by purge_sys and is reset after a purge batch has completed.

◆ index

dict_index_t* purge_node_t::index

NULL, or the next index whose record should be handled.

◆ m_lob_pages

LOB_free_set purge_node_t::m_lob_pages
private

Set of LOB first pages that are to be freed.

◆ mdl

MDL_ticket* purge_node_t::mdl

MDL ticket for the table name.

◆ modifier_trx_id

trx_id_t purge_node_t::modifier_trx_id

trx id for this purging record

◆ mysql_table

TABLE* purge_node_t::mysql_table

MySQL table instance.

◆ parent

dict_table_t* purge_node_t::parent

parent table for an FTS AUX TABLE

◆ parent_mdl

MDL_ticket* purge_node_t::parent_mdl

MDL ticket for the parent table of an FTS AUX TABLE.

◆ pcur

btr_pcur_t purge_node_t::pcur

persistent cursor used in searching the clustered index record

◆ rec_type

ulint purge_node_t::rec_type

undo log record type: TRX_UNDO_INSERT_REC, ...

◆ recs

Recs* purge_node_t::recs

Undo recs to purge.

◆ ref

dtuple_t* purge_node_t::ref

NULL, or row reference to the next row to handle.

◆ roll_ptr

roll_ptr_t purge_node_t::roll_ptr

roll pointer to undo log record

◆ row

dtuple_t* purge_node_t::row

NULL, or a copy (also fields copied to heap) of the indexed fields of the row to handle.

◆ rseg

trx_rseg_t* purge_node_t::rseg

◆ table

dict_table_t* purge_node_t::table

table where purge is done

◆ trx_id

trx_id_t purge_node_t::trx_id

trx id for this purging record

◆ undo_no

undo_no_t purge_node_t::undo_no

undo number of the record

◆ update

upd_t* purge_node_t::update

update vector for a clustered index record


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