MySQL 8.0.39
Source Code Documentation
TrxListIterator Class Reference

This iterates over RW trx_sys lists only. More...

Public Member Functions

 TrxListIterator ()
 
const trx_tcurrent ()
 Get the current transaction whose ordinality is m_index. More...
 
void next ()
 Advance the transaction current ordinal value and reset the transaction lock ordinal value. More...
 
TrxLockIteratorlock_iter ()
 

Private Member Functions

const trx_treposition () const
 Reposition the "cursor" on the current transaction. More...
 

Private Attributes

ulint m_index
 Ordinal value of the transaction in the current transaction list. More...
 
decltype(trx_sys->rw_trx_list) * m_trx_list
 Current transaction list. More...
 
TrxLockIterator m_lock_iter
 For iterating over a transaction's locks. More...
 

Detailed Description

This iterates over RW trx_sys lists only.

We need to keep track where the iterator was up to and we do that using an ordinal value.

Constructor & Destructor Documentation

◆ TrxListIterator()

TrxListIterator::TrxListIterator ( )
inline

Member Function Documentation

◆ current()

const trx_t * TrxListIterator::current ( )
inline

Get the current transaction whose ordinality is m_index.

Returns
current transaction or 0

◆ lock_iter()

TrxLockIterator & TrxListIterator::lock_iter ( )
inline

◆ next()

void TrxListIterator::next ( void  )
inline

Advance the transaction current ordinal value and reset the transaction lock ordinal value.

◆ reposition()

const trx_t * TrxListIterator::reposition ( ) const
inlineprivate

Reposition the "cursor" on the current transaction.

If it is the first time then the "cursor" will be positioned on the first transaction.

Returns
transaction instance or 0

Member Data Documentation

◆ m_index

ulint TrxListIterator::m_index
private

Ordinal value of the transaction in the current transaction list.

◆ m_lock_iter

TrxLockIterator TrxListIterator::m_lock_iter
private

For iterating over a transaction's locks.

◆ m_trx_list

decltype(trx_sys->rw_trx_list) * TrxListIterator::m_trx_list
private

Current transaction list.


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