#include <btr0mtib.h>
◆ Btree_loads
◆ Merger()
◆ add_root_for_subtrees()
dberr_t Btree_multi::Btree_load::Merger::add_root_for_subtrees |
( |
const size_t |
highest_level | ) |
|
|
private |
Create root node for the stiched sub-trees by combining the nodes at highest level creating another level if required.
- Parameters
-
[in] | highest_level | highest level of the merged tree. |
- Returns
- innodb error code.
◆ get_max_free()
size_t Btree_multi::Btree_load::Merger::get_max_free |
( |
| ) |
const |
|
inlineprivate |
Get the maximum free space available in an empty page in bytes.
- Returns
- the maximum free space available in an empty page.
◆ insert_node_ptrs()
dberr_t Btree_multi::Btree_load::Merger::insert_node_ptrs |
( |
std::vector< dtuple_t * > & |
all_node_ptrs, |
|
|
size_t & |
total_node_ptrs_size, |
|
|
size_t |
level |
|
) |
| |
|
private |
Insert the given list of node pointers into pages at the given level.
- Parameters
-
[in,out] | all_node_ptrs | list of node pointers |
[in,out] | total_node_ptrs_size | total space in bytes needed to insert all the node pointers. |
[in] | level | the level at which the node pointers are inserted. |
- Returns
- DB_SUCCESS if successful.
-
error code on failure.
◆ link_right_sibling()
void Btree_multi::Btree_load::Merger::link_right_sibling |
( |
const page_no_t |
l_page_no, |
|
|
const page_no_t |
r_page_no |
|
) |
| |
|
private |
Load the left page and update its FIL_PAGE_NEXT.
- Parameters
-
[in] | l_page_no | left page number |
[in] | r_page_no | right page number. |
◆ merge()
dberr_t Btree_multi::Btree_load::Merger::merge |
( |
bool |
sort | ) |
|
◆ remove_empty_subtrees()
void Btree_multi::Btree_load::Merger::remove_empty_subtrees |
( |
| ) |
|
|
private |
Remove any empty sub-trees with no records.
◆ subtree_link_levels()
dberr_t Btree_multi::Btree_load::Merger::subtree_link_levels |
( |
size_t & |
highest_level | ) |
|
|
private |
Stich sub-trees together to form a tree with one or multiple nodes at highest leve.
- Parameters
-
[out] | highest_level | highest level of the merged tree. |
- Returns
- innodb error code.
Loop till all subtrees are at same level or only one subtree remaining.
◆ validate_boundaries()
void Btree_multi::Btree_load::Merger::validate_boundaries |
( |
| ) |
|
|
private |
Validate sub-tree boundaries.
◆ m_btree_loads
Btree_loads& Btree_multi::Btree_load::Merger::m_btree_loads |
|
private |
Refernce to the subtrees to be merged.
◆ m_index
Index which is being built.
◆ m_trx
trx_t* Btree_multi::Btree_load::Merger::m_trx {} |
|
private |
Transaction making the changes.
◆ m_tuple_heap
Scoped_heap Btree_multi::Btree_load::Merger::m_tuple_heap {} |
|
private |
Memory heap to store node pointers.
The documentation for this class was generated from the following files: