MySQL  8.0.20
Source Code Documentation
PCursor Class Reference

Persistent cursor wrapper around btr_pcur_t. More...

Public Member Functions

 PCursor (btr_pcur_t *pcur, mtr_t *mtr, size_t read_level)
 Constructor. More...
 
void yield ()
 Check if there are threads waiting on the index latch. More...
 
dberr_t move_to_next_block (dict_index_t *index)
 Move to the next block. More...
 
void restore_position ()
 Restore the cursor position. More...
 

Private Attributes

mtr_tm_mtr {}
 Mini transaction. More...
 
btr_pcur_tm_pcur {}
 Persistent cursor. More...
 
size_t m_read_level {}
 Level where the cursor is positioned or need to be positioned in case of restore. More...
 

Detailed Description

Persistent cursor wrapper around btr_pcur_t.

Constructor & Destructor Documentation

◆ PCursor()

PCursor::PCursor ( btr_pcur_t pcur,
mtr_t mtr,
size_t  read_level 
)
inline

Constructor.

Parameters
[in,out]pcurPersistent cursor in use.
[in]mtrMini transaction used by the persistent cursor.
[in]read_levelread level where the block should be present.

Member Function Documentation

◆ move_to_next_block()

dberr_t PCursor::move_to_next_block ( dict_index_t index)

Move to the next block.

Parameters
[in]indexIndex being traversed.
Returns
DB_SUCCESS or error code.

◆ restore_position()

void PCursor::restore_position ( )
inline

Restore the cursor position.

◆ yield()

void PCursor::yield ( )

Check if there are threads waiting on the index latch.

Yield the latch so that other threads can progress.

Member Data Documentation

◆ m_mtr

mtr_t* PCursor::m_mtr {}
private

Mini transaction.

◆ m_pcur

btr_pcur_t* PCursor::m_pcur {}
private

Persistent cursor.

◆ m_read_level

size_t PCursor::m_read_level {}
private

Level where the cursor is positioned or need to be positioned in case of restore.


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