MySQL 8.4.2
Source Code Documentation
|
Structure that holds most AHI-related fields. More...
#include <buf0buf.h>
Public Member Functions | |
void | validate () const |
void | assert_empty () const |
void | assert_empty_on_init () const |
Public Attributes | |
std::atomic< btr_search_prefix_info_t > | recommended_prefix_info |
Recommended prefix info for hash search. More... | |
std::atomic< btr_search_prefix_info_t > | prefix_info |
Prefix info that was used for building hash index. More... | |
std::atomic< dict_index_t * > | index |
Index for which the adaptive hash index has been created, or nullptr if the page does not exist in the index. More... | |
std::atomic< uint16_t > | n_pointers |
Used in debugging. More... | |
Structure that holds most AHI-related fields.
|
inline |
|
inline |
|
inline |
std::atomic<dict_index_t *> buf_block_t::ahi_t::index |
Index for which the adaptive hash index has been created, or nullptr if the page does not exist in the index.
Note that it does not guarantee that the AHI index is complete, though: there may have been hash collisions etc. It may be modified:
std::atomic<uint16_t> buf_block_t::ahi_t::n_pointers |
Used in debugging.
The number of pointers in the adaptive hash index pointing to this frame; Modified under appropriate X-latch in btr_search_sys->parts[]->latch.
std::atomic<btr_search_prefix_info_t> buf_block_t::ahi_t::prefix_info |
Prefix info that was used for building hash index.
It cannot be modified while there are any record entries added in the AHI. It's invariant that all records added to AHI from this block were folded using this prefix info. It may only be modified when we are holding the appropriate X-latch in btr_search_sys->parts[]->latch. Also, it happens that it is modified to not-empty value only when the block is held in private or the block's lock is S- or X-latched. This implies that the field's non-empty value may be read and use reliably when the appropriate btr_search_sys->parts[]->latch S-latch or X-latch is being held, or the block's lock is X-latched.
std::atomic<btr_search_prefix_info_t> buf_block_t::ahi_t::recommended_prefix_info |
Recommended prefix info for hash search.
It is atomically copied from the index's current recommendation for the prefix info and should eventually get to the block's actual prefix info used. It is used to decide when the n_hash_helps should be reset. It is modified only while having S- or X- latch on block's lock.