#include <buf0buf.h>
Public Attributes | |
Optimistic search field | |
ib_uint64_t | modify_clock |
Hash search fields (unprotected) | |
NOTE that these fields are NOT protected by any semaphore! | |
ulint | n_hash_helps |
ulint | n_fields |
ulint | n_bytes |
ibool | left_side |
Hash search fields | |
These 6 fields may only be modified when we have an x-latch on btr_search_latch AND
An exception to this is when we init or create a page in the buffer pool in buf0buf.c. | |
unsigned | is_hashed:1 |
unsigned | curr_n_fields:10 |
unsigned | curr_n_bytes:15 |
unsigned | curr_left_side:1 |
dict_index_t * | index |
General fields | |
buf_page_t | page |
byte * | frame |
mutex_t | mutex |
rw_lock_t | lock |
unsigned | lock_hash_val:32 |
ibool | check_index_page_at_flush |
UT_LIST_NODE_T (buf_block_t) unzip_LRU |
buf_block_struct::UT_LIST_NODE_T | ( | buf_block_t | ) |
node of the decompressed LRU list; a block is in the unzip_LRU list if page.state == BUF_BLOCK_FILE_PAGE and page.zip.data != NULL
ibool buf_block_struct::check_index_page_at_flush |
TRUE if we know that this is an index page, and want the database to check its consistency before flush; note that there may be pages in the buffer pool which are index pages, but this flag is not set because we do not keep track of all pages; NOT protected by any mutex
Definition at line 1383 of file buf0buf.h.
Referenced by btr_create(), btr_cur_open_at_index_side_func(), btr_cur_search_to_nth_level(), btr_pcur_move_to_next_page(), buf_reset_check_index_page_at_flush(), and page_zip_reorganize().
unsigned buf_block_struct::curr_left_side |
TRUE or FALSE in hash indexing
Definition at line 1450 of file buf0buf.h.
Referenced by btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), and btr_search_update_hash_on_insert().
unsigned buf_block_struct::curr_n_bytes |
number of bytes in hash indexing
Definition at line 1448 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_delete(), and btr_search_update_hash_on_insert().
unsigned buf_block_struct::curr_n_fields |
prefix length for hash indexing: number of full fields
Definition at line 1446 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_delete(), and btr_search_update_hash_on_insert().
byte* buf_block_struct::frame |
pointer to buffer frame which is of size UNIV_PAGE_SIZE, and aligned to an address divisible by UNIV_PAGE_SIZE
Definition at line 1352 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), btr_search_guess_on_hash(), buf_LRU_block_free_non_file_page(), buf_LRU_get_free_only(), buf_page_create(), buf_zip_decompress(), ha_insert_for_fold_func(), lock_clust_rec_modify_check_and_lock(), lock_clust_rec_read_check_and_lock(), lock_move_rec_list_start(), lock_move_reorganize_page(), lock_rec_insert_check_and_lock(), lock_rec_store_on_page_infimum(), lock_rec_unlock(), lock_sec_rec_modify_check_and_lock(), lock_sec_rec_read_check_and_lock(), lock_update_delete(), lock_update_discard(), lock_update_insert(), lock_update_merge_left(), page_print(), page_print_list(), and page_zip_reorganize().
dict_index_t* buf_block_struct::index |
Index for which the adaptive hash index has been created.
Definition at line 1451 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_delete(), and btr_search_update_hash_on_insert().
unsigned buf_block_struct::is_hashed |
TRUE if hash index has already been built on this page; note that it does not guarantee that the index is complete, though: there may have been hash collisions, record deletions, etc.
Definition at line 1439 of file buf0buf.h.
Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_del_mark_set_sec_rec(), btr_cur_update_in_place(), btr_search_drop_page_hash_index(), btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_delete(), btr_search_update_hash_on_insert(), buf_page_peek_if_search_hashed(), and page_set_max_trx_id().
ibool buf_block_struct::left_side |
TRUE or FALSE, depending on whether the leftmost record of several records with the same prefix should be indexed in the hash index
Definition at line 1417 of file buf0buf.h.
Referenced by btr_search_move_or_delete_hash_entries().
rw_lock_t buf_block_struct::lock |
read-write lock of the buffer frame
Definition at line 1373 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), btr_search_move_or_delete_hash_entries(), btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_delete(), btr_search_update_hash_on_insert(), buf_page_create(), buf_page_get_gen(), buf_page_get_known_nowait(), buf_page_init_for_read(), buf_page_optimistic_get(), and buf_page_try_get_func().
unsigned buf_block_struct::lock_hash_val |
hashed value of the page address in the record lock hash table; protected by buf_block_t::lock (or buf_block_t::mutex, buf_pool->mutex in buf_page_get_gen(), buf_page_init_for_read() and buf_page_create())
Definition at line 1375 of file buf0buf.h.
Referenced by buf_page_get_gen().
ib_uint64_t buf_block_struct::modify_clock |
this clock is incremented every time a pointer to a record on the page may become obsolete; this is used in the optimistic cursor positioning: if the modify clock has not changed, we know that the pointer is still valid; this field may be changed if the thread (1) owns the pool mutex and the page is not bufferfixed, or (2) the thread has an x-latch on the block
Definition at line 1395 of file buf0buf.h.
Referenced by buf_page_optimistic_get().
mutex_t buf_block_struct::mutex |
mutex protecting this block: state (also protected by the buffer pool mutex), io_fix, buf_fix_count, and accessed; we introduce this new mutex in InnoDB-5.1 to relieve contention on the buffer pool mutex
Definition at line 1367 of file buf0buf.h.
Referenced by buf_LRU_block_free_non_file_page(), buf_LRU_get_free_only(), buf_page_create(), buf_page_get_gen(), buf_page_get_known_nowait(), buf_page_init_for_read(), buf_page_optimistic_get(), and buf_page_try_get_func().
ulint buf_block_struct::n_bytes |
recommended prefix: number of bytes in an incomplete field
Definition at line 1415 of file buf0buf.h.
Referenced by btr_search_move_or_delete_hash_entries().
ulint buf_block_struct::n_fields |
recommended prefix length for hash search: number of full fields
Definition at line 1413 of file buf0buf.h.
Referenced by btr_search_move_or_delete_hash_entries().
ulint buf_block_struct::n_hash_helps |
buf_page_t buf_block_struct::page |
page information; this must be the first field, so that buf_pool->page_hash can point to buf_page_t or buf_block_t
Definition at line 1348 of file buf0buf.h.
Referenced by btr_cur_optimistic_insert(), btr_search_drop_page_hash_index(), btr_search_guess_on_hash(), buf_LRU_block_free_non_file_page(), buf_LRU_get_free_block(), buf_LRU_get_free_only(), buf_page_create(), buf_page_get_gen(), buf_page_get_known_nowait(), buf_page_init_for_read(), buf_page_optimistic_get(), buf_page_peek_if_search_hashed(), buf_page_try_get_func(), buf_reset_check_index_page_at_flush(), buf_unzip_LRU_add_block(), buf_zip_decompress(), and ibuf_update_free_bits_zip().