MySQL 8.0.37
Source Code Documentation
Innodb_trx_scan_state Class Reference

State of a given scan. More...

Public Member Functions

 Innodb_trx_scan_state ()
 
 ~Innodb_trx_scan_state ()=default
 
scan_pass get_pass ()
 
void prepare_next_scan ()
 Prepare the next scan. More...
 
bool trx_id_in_range (trx_id_t trx_id)
 Check if a transaction belongs to the current range. More...
 

Public Attributes

const trx_id_t SCAN_RANGE = 256
 

Private Attributes

scan_pass m_scan_pass
 Current scan pass. More...
 
trx_id_t m_start_trx_id_range
 Start of the current range. More...
 
trx_id_t m_end_trx_id_range
 End of the current range. More...
 
trx_id_t m_next_trx_id_range
 Next range. More...
 

Detailed Description

State of a given scan.

Scans are restartable, and done in multiple calls. Overall, the code scans separately:

  • the RW trx list
  • the MySQL trx list For each list, the scan is done by ranges of trx_id values. Saving the current scan state allows to resume where the previous scan ended.

Constructor & Destructor Documentation

◆ Innodb_trx_scan_state()

Innodb_trx_scan_state::Innodb_trx_scan_state ( )
inline

◆ ~Innodb_trx_scan_state()

Innodb_trx_scan_state::~Innodb_trx_scan_state ( )
default

Member Function Documentation

◆ get_pass()

scan_pass Innodb_trx_scan_state::get_pass ( )
inline

◆ prepare_next_scan()

void Innodb_trx_scan_state::prepare_next_scan ( )
inline

Prepare the next scan.

When there are TRX after the current range, compute the next range. When there are no more TRX for this pass, advance to the next pass.

◆ trx_id_in_range()

bool Innodb_trx_scan_state::trx_id_in_range ( trx_id_t  trx_id)
inline

Check if a transaction belongs to the current range.

As a side effect, compute the next range.

Parameters
[in]trx_idTransaction id to evaluate
Returns
True if transaction is within range.

Member Data Documentation

◆ m_end_trx_id_range

trx_id_t Innodb_trx_scan_state::m_end_trx_id_range
private

End of the current range.

◆ m_next_trx_id_range

trx_id_t Innodb_trx_scan_state::m_next_trx_id_range
private

Next range.

◆ m_scan_pass

scan_pass Innodb_trx_scan_state::m_scan_pass
private

Current scan pass.

◆ m_start_trx_id_range

trx_id_t Innodb_trx_scan_state::m_start_trx_id_range
private

Start of the current range.

◆ SCAN_RANGE

const trx_id_t Innodb_trx_scan_state::SCAN_RANGE = 256

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