MySQL 8.4.2
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 savepoint () noexcept
 Create a savepoint and commit the mini-transaction. More...
 
void resume () noexcept
 Resume from savepoint. More...
 
dberr_t move_to_next_block (dict_index_t *index)
 Move to the next block. More...
 
void restore_position () noexcept
 Restore the cursor position. More...
 
page_cur_tget_page_cursor () noexcept
 
dberr_t restore_from_savepoint () noexcept
 Restore from a saved position. More...
 
dberr_t move_to_user_rec () noexcept
 Move to the first user rec on the restored page. More...
 
bool is_after_last_on_page () const noexcept
 
size_t read_level () const noexcept
 

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

◆ get_page_cursor()

page_cur_t * PCursor::get_page_cursor ( )
inlinenoexcept
Returns
the current page cursor.

◆ is_after_last_on_page()

bool PCursor::is_after_last_on_page ( ) const
inlinenoexcept
Returns
true if cursor is after last on page.

◆ 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.

◆ move_to_user_rec()

dberr_t PCursor::move_to_user_rec ( )
noexcept

Move to the first user rec on the restored page.

◆ read_level()

size_t PCursor::read_level ( ) const
inlinenoexcept
Returns
Level where the cursor is intended.

◆ restore_from_savepoint()

dberr_t PCursor::restore_from_savepoint ( )
noexcept

Restore from a saved position.

Returns
DB_SUCCESS or error code.

◆ restore_position()

void PCursor::restore_position ( )
inlinenoexcept

Restore the cursor position.

◆ resume()

void PCursor::resume ( )
noexcept

Resume from savepoint.

◆ savepoint()

void PCursor::savepoint ( )
noexcept

Create a savepoint and commit the mini-transaction.

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: