MySQL 8.0.40
Source Code Documentation
btr_cur_t Struct Reference

The tree cursor: the definition appears here only for the compiler to know struct size! More...

#include <btr0cur.h>

Public Attributes

dict_index_tindex {nullptr}
 Index on which the cursor is positioned. More...
 
page_cur_t page_cur
 Page cursor. More...
 
purge_node_tpurge_node {nullptr}
 Purge node, for BTR_DELETE. More...
 
buf_block_tleft_block {nullptr}
 this field is used to store a pointer to the left neighbor page, in the cases BTR_SEARCH_PREV and BTR_MODIFY_PREV More...
 
que_thr_tthr {nullptr}
 this field is only used when btr_cur_search_to_nth_level is called for an index entry insertion: the calling query thread is passed here to be used in the insert buffer More...
 
btr_path_tpath_arr {nullptr}
 In estimating the number of rows in range, we store in this array information of the path through the tree. More...
 
rtr_info_trtr_info {nullptr}
 rtree search info. More...
 
bool m_own_rtr_info = true
 Ownership of the above rtr_info member. More...
 
Page_fetch m_fetch_mode {Page_fetch::NORMAL}
 If cursor is used in a scan or simple page fetch. More...
 
btr_search_prefix_info_t prefix_info {}
 AHI prefix used in a hash search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED. More...
 
uint64_t ahi_hash_value {0}
 hash value used in the search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED. More...
 
btr_cur_method flag {BTR_CUR_UNSET}
 The following fields are used in btr_cur_search_to_nth_level to pass information: More...
 
ulint tree_height {0}
 Tree height if the search is done for a pessimistic insert or update operation. More...
 
ulint up_match {0}
 If the search mode was PAGE_CUR_LE, the number of matched fields to the the first user record to the right of the cursor record after btr_cur_search_to_nth_level; for the mode PAGE_CUR_GE, the matched fields to the first user record AT THE CURSOR or to the right of it; NOTE that the up_match and low_match values may exceed the correct values for comparison to the adjacent user record if that record is on a different leaf page! See the note in row_ins_duplicate_error_in_clust. More...
 
ulint up_bytes {0}
 Number of matched bytes to the right at the time cursor positioned; only used internally in searches: not defined after the search. More...
 
ulint low_match {0}
 If search mode was PAGE_CUR_LE, the number of matched fields to the first user record AT THE CURSOR or to the left of it after btr_cur_search_to_nth_level; NOT defined for PAGE_CUR_GE or any other search modes; see also the NOTE in up_match! More...
 
ulint low_bytes {0}
 Number of matched bytes to the left at the time cursor positioned; only used internally in searches: not defined after the search. More...
 
struct {
   btr_search_prefix_info_t   prefix_info {}
 AHI prefix used in a hash search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED. More...
 
   uint64_t   ahi_hash_value {0}
 hash value used in the search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED. More...
 
ahi
 

Detailed Description

The tree cursor: the definition appears here only for the compiler to know struct size!

Member Data Documentation

◆ 

struct { ... } btr_cur_t::ahi

◆ ahi_hash_value

uint64_t btr_cur_t::ahi_hash_value {0}

hash value used in the search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED.

◆ flag

btr_cur_method btr_cur_t::flag {BTR_CUR_UNSET}

The following fields are used in btr_cur_search_to_nth_level to pass information:

Search method used.

◆ index

dict_index_t* btr_cur_t::index {nullptr}

Index on which the cursor is positioned.

◆ left_block

buf_block_t* btr_cur_t::left_block {nullptr}

this field is used to store a pointer to the left neighbor page, in the cases BTR_SEARCH_PREV and BTR_MODIFY_PREV

◆ low_bytes

ulint btr_cur_t::low_bytes {0}

Number of matched bytes to the left at the time cursor positioned; only used internally in searches: not defined after the search.

◆ low_match

ulint btr_cur_t::low_match {0}

If search mode was PAGE_CUR_LE, the number of matched fields to the first user record AT THE CURSOR or to the left of it after btr_cur_search_to_nth_level; NOT defined for PAGE_CUR_GE or any other search modes; see also the NOTE in up_match!

◆ m_fetch_mode

Page_fetch btr_cur_t::m_fetch_mode {Page_fetch::NORMAL}

If cursor is used in a scan or simple page fetch.

◆ m_own_rtr_info

bool btr_cur_t::m_own_rtr_info = true

Ownership of the above rtr_info member.

◆ page_cur

page_cur_t btr_cur_t::page_cur

Page cursor.

◆ path_arr

btr_path_t* btr_cur_t::path_arr {nullptr}

In estimating the number of rows in range, we store in this array information of the path through the tree.

◆ prefix_info

btr_search_prefix_info_t btr_cur_t::prefix_info {}

AHI prefix used in a hash search if flag is any of BTR_CUR_HASH, BTR_CUR_HASH_FAIL or BTR_CUR_HASH_NOT_ATTEMPTED.

The cursor does not fill nor use the left_side member and comparisons to other instances should be done with equals_without_left_side(). Ideally we could have a separate class without this field that btr_search_prefix_info_t inherits or composes from, but this would make it larger than 64bits, at least on VC++, even if we inherit from a third (empty) class making all these types non-POD, and thus unable to do lock-free atomic operations.

◆ purge_node

purge_node_t* btr_cur_t::purge_node {nullptr}

Purge node, for BTR_DELETE.

◆ rtr_info

rtr_info_t* btr_cur_t::rtr_info {nullptr}

rtree search info.

◆ thr

que_thr_t* btr_cur_t::thr {nullptr}

this field is only used when btr_cur_search_to_nth_level is called for an index entry insertion: the calling query thread is passed here to be used in the insert buffer

◆ tree_height

ulint btr_cur_t::tree_height {0}

Tree height if the search is done for a pessimistic insert or update operation.

◆ up_bytes

ulint btr_cur_t::up_bytes {0}

Number of matched bytes to the right at the time cursor positioned; only used internally in searches: not defined after the search.

◆ up_match

ulint btr_cur_t::up_match {0}

If the search mode was PAGE_CUR_LE, the number of matched fields to the the first user record to the right of the cursor record after btr_cur_search_to_nth_level; for the mode PAGE_CUR_GE, the matched fields to the first user record AT THE CURSOR or to the right of it; NOTE that the up_match and low_match values may exceed the correct values for comparison to the adjacent user record if that record is on a different leaf page! See the note in row_ins_duplicate_error_in_clust.



The documentation for this struct was generated from the following file: