MySQL 9.1.0
Source Code Documentation
mtr_t::Command Class Reference

Public Member Functions

 Command (mtr_t *mtr)
 Constructor. More...
 
void init (mtr_t *mtr)
 
 ~Command ()
 Destructor. More...
 
void execute ()
 Write the redo log record, add dirty pages to the flush list and release the resources. More...
 
void add_dirty_blocks_to_flush_list (lsn_t start_lsn, lsn_t end_lsn)
 Add blocks modified in this mini-transaction to the flush list. More...
 
void release_all ()
 Release both the latches and blocks used in the mini-transaction. More...
 
void release_resources ()
 Release the resources. More...
 

Private Member Functions

ulint prepare_write ()
 Prepare to write the mini-transaction log to the redo log buffer. More...
 

Private Attributes

bool m_sync
 true if it is a sync mini-transaction. More...
 
mtr_t::Implm_impl
 The mini-transaction state. More...
 
volatile ulint m_locks_released
 Set to 1 after the user thread releases the latches. More...
 

Constructor & Destructor Documentation

◆ Command()

mtr_t::Command::Command ( mtr_t mtr)
inlineexplicit

Constructor.

Takes ownership of the mtr->m_impl, is responsible for deleting it.

Parameters
[in,out]mtrMini-transaction

◆ ~Command()

mtr_t::Command::~Command ( )
inline

Destructor.

Member Function Documentation

◆ add_dirty_blocks_to_flush_list()

void mtr_t::Command::add_dirty_blocks_to_flush_list ( lsn_t  start_lsn,
lsn_t  end_lsn 
)

Add blocks modified in this mini-transaction to the flush list.

◆ execute()

void mtr_t::Command::execute ( )

Write the redo log record, add dirty pages to the flush list and release the resources.

◆ init()

void mtr_t::Command::init ( mtr_t mtr)
inline

◆ prepare_write()

ulint mtr_t::Command::prepare_write ( )
private

Prepare to write the mini-transaction log to the redo log buffer.

Returns
number of bytes to write in finish_write()

◆ release_all()

void mtr_t::Command::release_all ( )

Release both the latches and blocks used in the mini-transaction.

Release the latches and blocks acquired by this mini-transaction.

◆ release_resources()

void mtr_t::Command::release_resources ( )

Release the resources.

Member Data Documentation

◆ m_impl

mtr_t::Impl* mtr_t::Command::m_impl
private

The mini-transaction state.

◆ m_locks_released

volatile ulint mtr_t::Command::m_locks_released
private

Set to 1 after the user thread releases the latches.

The log writer thread must wait for this to be set to 1.

◆ m_sync

bool mtr_t::Command::m_sync
private

true if it is a sync mini-transaction.


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