186#define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
195#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
202#ifndef UNIV_HOTBACKUP
248 constexpr uint64_t HASH_MASK = 1653893711;
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:51
uint32_t page_no_t
Page number.
Definition: api0api.h:49
byte buf_frame_t
A buffer frame.
Definition: buf0types.h:62
constexpr uint32_t BUF_BUDDY_LOW_SHIFT
Parameters of binary buddy system for compressed pages (buf0buddy.h)
Definition: buf0types.h:180
std::atomic_uint32_t buf_pool_resize_status_code
Buffer pool resize status code and progress are tracked using these atomic variables to ensure thread...
Definition: buf0buf.cc:309
BPageMutex BufPoolZipMutex
Definition: buf0types.h:201
constexpr uint32_t BUF_NO_CHECKSUM_MAGIC
Magic value to use instead of checksums when they are disabled.
Definition: buf0types.h:45
buf_pool_resize_status_code_t
Enumerate possible status codes during buffer pool resize.
Definition: buf0types.h:139
@ BUF_POOL_RESIZE_HASH
Resizing hash.
Definition: buf0types.h:159
@ BUF_POOL_RESIZE_START
Resize started.
Definition: buf0types.h:144
@ BUF_POOL_RESIZE_FAILED
Resizing failed.
Definition: buf0types.h:162
@ BUF_POOL_RESIZE_DISABLE_AHI
Disabling Adaptive Hash Index.
Definition: buf0types.h:147
@ BUF_POOL_RESIZE_COMPLETE
Resize completed or Resize not in progress.
Definition: buf0types.h:141
@ BUF_POOL_RESIZE_GLOBAL_LOCK
Acquiring global lock.
Definition: buf0types.h:153
@ BUF_POOL_RESIZE_WITHDRAW_BLOCKS
Withdrawing blocks.
Definition: buf0types.h:150
@ BUF_POOL_RESIZE_IN_PROGRESS
Resizing pool.
Definition: buf0types.h:156
std::atomic_uint32_t buf_pool_resize_status_progress
Definition: buf0buf.cc:310
constexpr uint32_t BUF_BUDDY_LOW
Smallest buddy page size.
Definition: buf0types.h:183
constexpr uint32_t BUF_BUDDY_SIZES_MAX
Maximum number of buddy sizes based on the max page size.
Definition: buf0types.h:189
buf_flush_t
Flags for flush types.
Definition: buf0types.h:68
@ BUF_FLUSH_LRU
Flush via the LRU list.
Definition: buf0types.h:70
@ BUF_FLUSH_LIST
Flush via the flush list of dirty blocks.
Definition: buf0types.h:73
@ BUF_FLUSH_SINGLE_PAGE
Flush via the LRU list but only a single page.
Definition: buf0types.h:76
@ BUF_FLUSH_N_TYPES
Index of last element + 1
Definition: buf0types.h:79
buf_remove_t
Algorithm to remove the pages for a tablespace from the buffer pool.
Definition: buf0types.h:84
@ BUF_REMOVE_FLUSH_WRITE
Flush dirty pages to disk only don't remove from the buffer pool.
Definition: buf0types.h:95
@ BUF_REMOVE_NONE
Don't remove any pages.
Definition: buf0types.h:86
@ BUF_REMOVE_ALL_NO_WRITE
Remove all pages from the buffer pool, don't write or sync to disk.
Definition: buf0types.h:89
@ BUF_REMOVE_FLUSH_NO_WRITE
Remove only from the flush list, don't write or sync to disk.
Definition: buf0types.h:92
ib_mutex_t BufListMutex
Definition: buf0types.h:199
ib_bpmutex_t BPageMutex
Definition: buf0types.h:198
ib_mutex_t FlushListMutex
Definition: buf0types.h:200
buf_io_fix
Flags for io_fix types.
Definition: buf0types.h:99
@ BUF_IO_NONE
no pending I/O
Definition: buf0types.h:101
@ BUF_IO_WRITE
write pending
Definition: buf0types.h:107
@ BUF_IO_READ
read pending
Definition: buf0types.h:104
@ BUF_IO_PIN
disallow relocation of block and its removal from the flush_list
Definition: buf0types.h:110
rw_lock_t BPageLock
Definition: buf0types.h:203
std::ostream & operator<<(std::ostream &out, const page_id_t &page_id)
Print the given page_id_t object.
Definition: checksum.cc:711
srv_checksum_algorithm_t
Alternatives for srv_checksum_algorithm, which can be changed by setting innodb_checksum_algorithm.
Definition: buf0types.h:115
@ SRV_CHECKSUM_ALGORITHM_STRICT_INNODB
Write innodb, allow innodb when reading.
Definition: buf0types.h:122
@ SRV_CHECKSUM_ALGORITHM_CRC32
Write crc32, allow crc32, innodb or none when reading.
Definition: buf0types.h:116
@ SRV_CHECKSUM_ALGORITHM_STRICT_NONE
Write none, allow none when reading.
Definition: buf0types.h:126
@ SRV_CHECKSUM_ALGORITHM_INNODB
Write innodb, allow crc32, innodb or none when reading.
Definition: buf0types.h:120
@ SRV_CHECKSUM_ALGORITHM_NONE
Write none, allow crc32, innodb or none when reading.
Definition: buf0types.h:124
@ SRV_CHECKSUM_ALGORITHM_STRICT_CRC32
Write crc32, allow crc32 when reading.
Definition: buf0types.h:118
bool is_checksum_strict(srv_checksum_algorithm_t algo)
Definition: buf0types.h:165
We use Flush_observer to track flushing of non-redo logged pages in bulk create index(btr0load....
Definition: buf0flu.h:269
Definition: buf0buf.h:1125
Page identifier.
Definition: buf0types.h:207
uint64_t hash() const
Retrieve the hash value.
Definition: buf0types.h:247
space_id_t m_space
Tablespace id.
Definition: buf0types.h:286
page_id_t(space_id_t space, page_no_t page_no)
Constructor from (space, page_no).
Definition: buf0types.h:234
space_id_t space() const
Retrieve the tablespace id.
Definition: buf0types.h:239
bool operator<(const page_id_t &other) const
Provides a lexicographic ordering on <space_id,page_no> pairs.
Definition: buf0types.h:279
page_no_t m_page_no
Page number.
Definition: buf0types.h:289
page_id_t()=delete
This class does not have a default constructor, because there is no natural choice for default values...
void reset(space_id_t space, page_no_t page_no)
Reset the values from a (space, page_no).
Definition: buf0types.h:255
void set_page_no(page_no_t page_no)
Reset the page number only.
Definition: buf0types.h:262
bool operator==(const page_id_t &a) const
Check if a given page_id_t object is equal to the current one.
Definition: buf0types.h:267
friend std::ostream & operator<<(std::ostream &out, const page_id_t &page_id)
Print the given page_id_t object.
Definition: checksum.cc:711
page_no_t page_no() const
Retrieve the page number.
Definition: buf0types.h:243
bool operator!=(const page_id_t &a) const
Check if a given page_id_t object is not equal to the current one.
Definition: buf0types.h:274
The interface to the operating system condition variables.
The buffer control block structure.
Definition: buf0buf.h:1690
Statistics of buddy blocks of a given size.
Definition: buf0buf.h:2149
A chunk of buffers.
Definition: buf0buf.ic:53
The buffer pool statistics structure.
Definition: buf0buf.h:2067
The buffer pool structure.
Definition: buf0buf.h:2175
The structure used in the spin lock implementation of a read-write lock.
Definition: sync0rw.h:360
The read-write lock (for threads, not for database transactions)
constexpr uint32_t UNIV_PAGE_SIZE_SHIFT_MAX
Maximum Page Size Shift (power of 2)
Definition: univ.i:312
constexpr uint32_t UNIV_ZIP_SIZE_SHIFT_MIN
log2 of smallest compressed page size (1<<10 == 1024 bytes) Note: This must never change!
Definition: univ.i:298
unsigned long int ulint
Definition: univ.i:406
Utilities for byte operations.
Random numbers and hashing.