MySQL  8.0.19
Source Code Documentation
Parallel_reader::Ctx Class Reference

Parallel reader execution context. More...

#include <row0pread.h>

Public Member Functions

 ~Ctx ()
 Destructor. More...
 
size_t id () const
 
size_t scan_id () const
 The scan ID of the scan context this belongs to. More...
 
const trx_ttrx () const
 
const dict_index_tindex () const
 

Public Attributes

size_t m_thread_id {std::numeric_limits<size_t>::max()}
 Current executing thread ID. More...
 
const buf_block_tm_block {}
 Current block. More...
 
const rec_tm_rec {}
 Current row. More...
 
bool m_first_rec {true}
 True if m_rec is the first record in the page. More...
 
ulint * m_offsets {}
 
bool m_start {}
 Start of a new range to scan. More...
 

Private Member Functions

 Ctx (size_t id, Scan_ctx *scan_ctx, const Scan_ctx::Range &range)
 Constructor. More...
 
dberr_t traverse ()
 Traverse the pages by key order. More...
 
dberr_t traverse_recs (PCursor *pcursor, mtr_t *mtr)
 Traverse the records in a node. More...
 
bool move_to_next_node (PCursor *pcursor, mtr_t *mtr)
 Move to the next node in the specified level. More...
 
dberr_t split ()
 Split the context into sub-ranges and add them to the execution queue. More...
 

Private Attributes

size_t m_id {std::numeric_limits<size_t>::max()}
 Context ID. More...
 
bool m_split {}
 If true the split the context at the block level. More...
 
Scan_ctx::Range m_range {}
 Range to read in this context. More...
 
Scan_ctxm_scan_ctx {}
 Scanner context. More...
 

Friends

class Parallel_reader
 

Detailed Description

Parallel reader execution context.

Constructor & Destructor Documentation

◆ Ctx()

Parallel_reader::Ctx::Ctx ( size_t  id,
Scan_ctx scan_ctx,
const Scan_ctx::Range range 
)
inlineprivate

Constructor.

Parameters
[in]idThread ID.
[in]scan_ctxScan context.
[in]rangeRange that the thread has to read.

◆ ~Ctx()

Parallel_reader::Ctx::~Ctx ( )

Destructor.

Member Function Documentation

◆ id()

size_t Parallel_reader::Ctx::id ( ) const
inline
Returns
the context ID.

◆ index()

const dict_index_t* Parallel_reader::Ctx::index ( ) const
inline
Returns
the index being scanned.

◆ move_to_next_node()

bool Parallel_reader::Ctx::move_to_next_node ( PCursor pcursor,
mtr_t mtr 
)
private

Move to the next node in the specified level.

Parameters
[in]pcursorpersistent b-tree cursor
[in]mtrmtr
Returns
success

◆ scan_id()

size_t Parallel_reader::Ctx::scan_id ( ) const
inline

The scan ID of the scan context this belongs to.

◆ split()

dberr_t Parallel_reader::Ctx::split ( )
private

Split the context into sub-ranges and add them to the execution queue.

Returns
DB_SUCCESS or error code.

◆ traverse()

dberr_t Parallel_reader::Ctx::traverse ( )
private

Traverse the pages by key order.

Returns
DB_SUCCESS or error code.

◆ traverse_recs()

dberr_t Parallel_reader::Ctx::traverse_recs ( PCursor pcursor,
mtr_t mtr 
)
private

Traverse the records in a node.

Parameters
[in]pcursorpersistent b-tree cursor
[in]mtrmtr
Returns
error

◆ trx()

const trx_t* Parallel_reader::Ctx::trx ( ) const
inline
Returns
the covering transaction.

Friends And Related Function Documentation

◆ Parallel_reader

friend class Parallel_reader
friend

Member Data Documentation

◆ m_block

const buf_block_t* Parallel_reader::Ctx::m_block {}

Current block.

◆ m_first_rec

bool Parallel_reader::Ctx::m_first_rec {true}

True if m_rec is the first record in the page.

◆ m_id

size_t Parallel_reader::Ctx::m_id {std::numeric_limits<size_t>::max()}
private

Context ID.

◆ m_offsets

ulint* Parallel_reader::Ctx::m_offsets {}

◆ m_range

Scan_ctx::Range Parallel_reader::Ctx::m_range {}
private

Range to read in this context.

◆ m_rec

const rec_t* Parallel_reader::Ctx::m_rec {}

Current row.

◆ m_scan_ctx

Scan_ctx* Parallel_reader::Ctx::m_scan_ctx {}
private

Scanner context.

◆ m_split

bool Parallel_reader::Ctx::m_split {}
private

If true the split the context at the block level.

◆ m_start

bool Parallel_reader::Ctx::m_start {}

Start of a new range to scan.

◆ m_thread_id

size_t Parallel_reader::Ctx::m_thread_id {std::numeric_limits<size_t>::max()}

Current executing thread ID.


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