MySQL 8.0.40
Source Code Documentation
|
The B-tree. More...
Functions | |
static buf_block_t * | btr_block_get_func (const page_id_t &page_id, const page_size_t &page_size, ulint mode, ut::Location location, const dict_index_t *index, mtr_t *mtr) |
static void | btr_page_set_index_id (page_t *page, page_zip_des_t *page_zip, space_index_t id, mtr_t *mtr) |
Sets the index id field of a page. More... | |
static space_index_t | btr_page_get_index_id (const page_t *page) |
Gets the index id field of a page. More... | |
static ulint | btr_page_get_level (const page_t *page) |
Gets the node level field in an index page. More... | |
static void | btr_page_set_level (page_t *page, page_zip_des_t *page_zip, ulint level, mtr_t *mtr) |
Sets the node level field in an index page. More... | |
static page_no_t | btr_page_get_next (const page_t *page, mtr_t *mtr) |
static void | btr_page_set_next (page_t *page, page_zip_des_t *page_zip, page_no_t next, mtr_t *mtr) |
Sets the next index page field. More... | |
static page_no_t | btr_page_get_prev (const page_t *page) |
static page_no_t | btr_page_get_prev (const page_t *page, mtr_t *mtr) |
static void | btr_page_set_prev (page_t *page, page_zip_des_t *page_zip, page_no_t prev, mtr_t *mtr) |
Sets the previous index page field. More... | |
static page_no_t | btr_node_ptr_get_child_page_no (const rec_t *rec, const ulint *offsets) |
static bool | btr_is_first_page_on_level (const page_t *page) |
Check if the given page is first page on level. More... | |
static void | btr_leaf_page_release (buf_block_t *block, ulint latch_mode, mtr_t *mtr) |
Releases the latches on a leaf page and bufferunfixes it. More... | |
Variables | |
constexpr uint32_t | BTR_MAX_NODE_LEVEL = 45 |
NOTE - Changing this from the original number of 50 to 45 as insert_debug.test was failing in ASAN build because of a stack overflow issue. More... | |
The B-tree.
Created 6/2/1994 Heikki Tuuri
|
inlinestatic |
|
inlinestatic |
Check if the given page is first page on level.
[in] | page | Btree page |
|
inlinestatic |
Releases the latches on a leaf page and bufferunfixes it.
block | in: buffer block |
latch_mode | in: BTR_SEARCH_LEAF or BTR_MODIFY_LEAF |
mtr | in: mtr |
|
inlinestatic |
|
inlinestatic |
Gets the index id field of a page.
page | in: index page |
Gets the node level field in an index page.
[in] | page | index page |
|
inlinestatic |
Sets the index id field of a page.
page | in: page to be created |
page_zip | in: compressed page whose uncompressed part will be updated, or NULL |
id | in: index id |
mtr | in: mtr |
|
inlinestatic |
Sets the node level field in an index page.
page | in: index page |
page_zip | in: compressed page whose uncompressed part will be updated, or NULL |
level | in: level, leaf level == 0 |
mtr | in: mini-transaction handle |
|
inlinestatic |
Sets the next index page field.
page | in: index page |
page_zip | in: compressed page whose uncompressed part will be updated, or NULL |
next | in: next page number |
mtr | in: mini-transaction handle |
|
inlinestatic |
Sets the previous index page field.
page | in: index page |
page_zip | in: compressed page whose uncompressed part will be updated, or NULL |
prev | in: previous page number |
mtr | in: mini-transaction handle |
|
constexpr |
NOTE - Changing this from the original number of 50 to 45 as insert_debug.test was failing in ASAN build because of a stack overflow issue.
It was found that rtr_info_t was taking up a lot of stack space in the function btr_insert_on_non_leaf_level_func which is part of the recursive stack trace. Maximum B-tree page level (not really a hard limit). Used in debug assertions in btr_page_set_level and btr_page_get_level