MySQL 9.1.0
Source Code Documentation
|
Context information for each level. More...
#include <btr0mtib.h>
Public Member Functions | |
Level_ctx (dict_index_t *index, size_t level, Btree_load *btree_load) | |
Constructor. More... | |
~Level_ctx () | |
Destructor. More... | |
dberr_t | init () |
Initialize. More... | |
bool | is_leaf () const |
Check if this is leaf level. More... | |
Page_load * | create_page_load () |
void | free_page_load () |
Free the current page load. More... | |
dberr_t | alloc_page_num (page_no_t &page_no) |
Allocate a page number. More... | |
dberr_t | alloc_extent () |
Allocate one extent in the relevant file segment. More... | |
buf_block_t * | alloc (const page_no_t new_page_no) noexcept |
Allocate private memory buffer (BUF_BLOCK_MEMORY) block for given page number. More... | |
void | set_current_page_load (Page_load *sibling) |
Page_load * | get_page_load () const |
trx_id_t | get_trx_id () const |
void | build_extent_cache () |
Build the extent cache. More... | |
bool | load_extent_from_cache () |
Load one extent from extent cache. More... | |
void | build_page_cache () |
Build page loader cache for current exent. More... | |
Page_load * | get_page_load_from_cache () |
Get a free page loader from cache. More... | |
bool | is_page_tracked (const page_no_t &page_no) const |
Static Public Member Functions | |
static Level_ctx * | create (dict_index_t *index, size_t level, Btree_load *btree_load) |
Static member function construct a Level_ctx object. More... | |
static void | destroy (Level_ctx *obj) |
Static member function to destroy a Level_ctx object. More... | |
Public Attributes | |
Page_extent * | m_page_extent {} |
The current extent that is being loaded. More... | |
std::vector< Page_extent * > | m_cached_extents |
Pre allocated extents to prevent repeated allocation and free. More... | |
page_no_t | m_first_page {FIL_NULL} |
The page_no of the first page in this level. More... | |
page_no_t | m_last_page {FIL_NULL} |
The page_no of the last page in this level. More... | |
dict_index_t * | m_index {} |
The index which is being built. More... | |
const size_t | m_level {} |
The B-tree level whose context information is stored in this obj. More... | |
Page_load * | m_page_load {} |
The Page_load of the current page being loaded. More... | |
Btree_load * | m_btree_load |
A back pointer to conceptually higher level btree load object. More... | |
size_t | m_stat_n_pages {} |
Number of pages allocated at this level. More... | |
size_t | m_stat_n_extents {} |
Number of extents allocated at this level. More... | |
bool | m_extent_full {true} |
True if the current extent is full. More... | |
std::vector< page_no_t > | m_pages_allocated |
Context information for each level.
|
inline |
Constructor.
[in] | index | dictionary index object. |
[in] | level | the B-tree level of this context object. |
[in] | btree_load | a back pointer to the Btree_load object to which this Level_ctx object is a part of. |
Btree_multi::Level_ctx::~Level_ctx | ( | ) |
Destructor.
|
noexcept |
Allocate private memory buffer (BUF_BLOCK_MEMORY) block for given page number.
dberr_t Btree_multi::Level_ctx::alloc_extent | ( | ) |
Allocate one extent in the relevant file segment.
No associated buffer blocks are allocated.
Allocate a page number.
Subsequently a Page_load will be created with the allocated page number.
[out] | page_no | page number that was allocated. |
void Btree_multi::Level_ctx::build_extent_cache | ( | ) |
Build the extent cache.
void Btree_multi::Level_ctx::build_page_cache | ( | ) |
Build page loader cache for current exent.
|
static |
Static member function construct a Level_ctx object.
[in] | index | dictionary index object. |
[in] | level | the B-tree level of this context object. |
[in] | btree_load | a back pointer to the Btree_load object to which this Level_ctx object is a part of. |
Page_load * Btree_multi::Level_ctx::create_page_load | ( | ) |
|
static |
Static member function to destroy a Level_ctx object.
[in] | obj | the Level_ctx object to destroy. |
void Btree_multi::Level_ctx::free_page_load | ( | ) |
Free the current page load.
|
inline |
Page_load * Btree_multi::Level_ctx::get_page_load_from_cache | ( | ) |
Get a free page loader from cache.
|
inline |
dberr_t Btree_multi::Level_ctx::init | ( | void | ) |
Initialize.
|
inline |
Check if this is leaf level.
bool Btree_multi::Level_ctx::is_page_tracked | ( | const page_no_t & | page_no | ) | const |
bool Btree_multi::Level_ctx::load_extent_from_cache | ( | ) |
Load one extent from extent cache.
|
inline |
Btree_load* Btree_multi::Level_ctx::m_btree_load |
A back pointer to conceptually higher level btree load object.
std::vector<Page_extent *> Btree_multi::Level_ctx::m_cached_extents |
Pre allocated extents to prevent repeated allocation and free.
bool Btree_multi::Level_ctx::m_extent_full {true} |
True if the current extent is full.
The page_no of the first page in this level.
dict_index_t* Btree_multi::Level_ctx::m_index {} |
The index which is being built.
The page_no of the last page in this level.
const size_t Btree_multi::Level_ctx::m_level {} |
The B-tree level whose context information is stored in this obj.
Page_extent* Btree_multi::Level_ctx::m_page_extent {} |
The current extent that is being loaded.
Page_load* Btree_multi::Level_ctx::m_page_load {} |
The Page_load of the current page being loaded.
std::vector<page_no_t> Btree_multi::Level_ctx::m_pages_allocated |
size_t Btree_multi::Level_ctx::m_stat_n_extents {} |
Number of extents allocated at this level.
size_t Btree_multi::Level_ctx::m_stat_n_pages {} |
Number of pages allocated at this level.