MySQL 8.0.39
Source Code Documentation
|
Parallel reader execution context. More...
#include <row0pread.h>
Public Member Functions | |
Ctx (size_t id, Scan_ctx *scan_ctx, const Scan_ctx::Range &range) | |
Constructor. More... | |
~Ctx ()=default | |
Destructor. More... | |
size_t | id () const |
size_t | scan_id () const |
The scan ID of the scan context this belongs to. More... | |
const trx_t * | trx () const |
const dict_index_t * | index () const |
size_t | thread_id () const |
Thread_ctx * | thread_ctx () const |
size_t | partition_id () const |
bool | is_rec_visible (const rec_t *&rec, ulint *&offsets, mem_heap_t *&heap, mtr_t *mtr) |
Build an old version of the row if required. More... | |
Public Attributes | |
Thread_ctx * | m_thread_ctx {} |
Context information related to executing thread ID. More... | |
const buf_block_t * | m_block {} |
Current block. More... | |
const rec_t * | m_rec {} |
Current row. More... | |
size_t | m_n_pages {} |
Number of pages traversed by the context. 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 | |
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) |
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... | |
bool | is_error_set () const |
Private Attributes | |
size_t | m_id {std::numeric_limits<size_t>::max()} |
Context ID. More... | |
bool | m_split {} |
If true then split the context at the block level. More... | |
Scan_ctx::Range | m_range {} |
Range to read in this context. More... | |
Scan_ctx * | m_scan_ctx {} |
Scanner context. More... | |
Friends | |
class | Parallel_reader |
Parallel reader execution context.
|
inline |
Constructor.
[in] | id | Thread ID. |
[in] | scan_ctx | Scan context. |
[in] | range | Range that the thread has to read. |
|
default |
Destructor.
|
inline |
|
inline |
|
inlineprivate |
|
inline |
Build an old version of the row if required.
[in,out] | rec | Current row read from the index. This can be modified by this method if an older version needs to be built. |
[in,out] | offsets | Same as above but pertains to the rec offsets |
[in,out] | heap | Heap to use if a previous version needs to be built from the undo log. |
[in,out] | mtr | Mini-transaction covering the read. |
|
private |
Move to the next node in the specified level.
[in] | pcursor | persistent b-tree cursor |
|
inline |
|
inline |
The scan ID of the scan context this belongs to.
|
private |
Split the context into sub-ranges and add them to the execution queue.
|
inline |
|
inline |
|
private |
Traverse the pages by key order.
Traverse the records in a node.
[in] | pcursor | persistent b-tree cursor |
[in] | mtr | mtr |
|
inline |
|
friend |
const buf_block_t* Parallel_reader::Ctx::m_block {} |
Current block.
bool Parallel_reader::Ctx::m_first_rec {true} |
True if m_rec is the first record in the page.
|
private |
Context ID.
size_t Parallel_reader::Ctx::m_n_pages {} |
Number of pages traversed by the context.
ulint* Parallel_reader::Ctx::m_offsets {} |
|
private |
Range to read in this context.
const rec_t* Parallel_reader::Ctx::m_rec {} |
Current row.
|
private |
Scanner context.
|
private |
If true then split the context at the block level.
bool Parallel_reader::Ctx::m_start {} |
Start of a new range to scan.
Thread_ctx* Parallel_reader::Ctx::m_thread_ctx {} |
Context information related to executing thread ID.