drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
buf_page_struct Struct Reference

#include <buf0buf.h>

Collaboration diagram for buf_page_struct:
[legend]

Public Attributes

General fields

None of these bit-fields must be modified without holding buf_page_get_mutex() [buf_block_struct::mutex or buf_pool->zip_mutex], since they can be stored in the same machine word. Some of these fields are additionally protected by buf_pool->mutex.

unsigned space:32
unsigned offset:32
unsigned state:3
unsigned flush_type:2
unsigned io_fix:2
unsigned buf_fix_count:19
unsigned buf_pool_index:6
page_zip_des_t zip
buf_page_t * hash

Page flushing fields

All these are protected by buf_pool->mutex.

ib_uint64_t newest_modification
ib_uint64_t oldest_modification
 UT_LIST_NODE_T (buf_page_t) list

LRU replacement algorithm fields

These fields are protected by buf_pool->mutex only (not buf_pool->zip_mutex or buf_block_struct::mutex).

unsigned old:1
unsigned freed_page_clock:31
unsigned access_time:32
 UT_LIST_NODE_T (buf_page_t) LRU

Detailed Description

The common buffer control block structure for compressed and uncompressed frames

Definition at line 1257 of file buf0buf.h.

Member Function Documentation

◆ UT_LIST_NODE_T() [1/2]

buf_page_struct::UT_LIST_NODE_T ( buf_page_t )

based on state, this is a list node, protected either by buf_pool->mutex or by buf_pool->flush_list_mutex, in one of the following lists in buf_pool:

  • BUF_BLOCK_NOT_USED: free
  • BUF_BLOCK_FILE_PAGE: flush_list
  • BUF_BLOCK_ZIP_DIRTY: flush_list
  • BUF_BLOCK_ZIP_PAGE: zip_clean
  • BUF_BLOCK_ZIP_FREE: zip_free[]

If bpage is part of flush_list then the node pointers are covered by buf_pool->flush_list_mutex. Otherwise these pointers are protected by buf_pool->mutex.

The contents of the list node is undefined if !in_flush_list && state == BUF_BLOCK_FILE_PAGE, or if state is one of BUF_BLOCK_MEMORY, BUF_BLOCK_REMOVE_HASH or BUF_BLOCK_READY_IN_USE.

◆ UT_LIST_NODE_T() [2/2]

buf_page_struct::UT_LIST_NODE_T ( buf_page_t )

node of the LRU list

Member Data Documentation

◆ access_time

unsigned buf_page_struct::access_time

time of first access, or 0 if the block was never accessed in the buffer pool

Definition at line 1401 of file buf0buf.h.

◆ buf_fix_count

unsigned buf_page_struct::buf_fix_count

count of how manyfold this block is currently bufferfixed

Definition at line 1286 of file buf0buf.h.

◆ buf_pool_index

unsigned buf_page_struct::buf_pool_index

index number of the buffer pool that this block belongs to

Definition at line 1288 of file buf0buf.h.

◆ flush_type

unsigned buf_page_struct::flush_type

if this block is currently being flushed to disk, this tells the flush_type.

See also
enum buf_flush

Definition at line 1279 of file buf0buf.h.

◆ freed_page_clock

unsigned buf_page_struct::freed_page_clock

the value of buf_pool->freed_page_clock when this block was the last time put to the head of the LRU list; a thread is allowed to read this for heuristic purposes without holding any mutex or latch

Definition at line 1393 of file buf0buf.h.

◆ hash

buf_page_t* buf_page_struct::hash

node used in chaining to buf_pool->page_hash or buf_pool->zip_hash

Definition at line 1302 of file buf0buf.h.

◆ io_fix

unsigned buf_page_struct::io_fix

type of pending I/O operation; also protected by buf_pool->mutex

See also
enum buf_io_fix

Definition at line 1283 of file buf0buf.h.

◆ newest_modification

ib_uint64_t buf_page_struct::newest_modification

log sequence number of the youngest modification to this block, zero if not modified. Protected by block mutex

Definition at line 1359 of file buf0buf.h.

◆ offset

unsigned buf_page_struct::offset

page number; also protected by buf_pool->mutex.

Definition at line 1268 of file buf0buf.h.

◆ old

unsigned buf_page_struct::old

TRUE if the block is in the old blocks in buf_pool->LRU_old

Definition at line 1391 of file buf0buf.h.

◆ oldest_modification

ib_uint64_t buf_page_struct::oldest_modification

log sequence number of the START of the log entry written of the oldest modification to this block which has not yet been flushed on disk; zero if all modifications are on disk. Writes to this field must be covered by both block->mutex and buf_pool->flush_list_mutex. Hence reads can happen while holding any one of the two mutexes

Definition at line 1365 of file buf0buf.h.

◆ space

unsigned buf_page_struct::space

tablespace id; also protected by buf_pool->mutex.

Definition at line 1266 of file buf0buf.h.

◆ state

unsigned buf_page_struct::state

state of the control block; also protected by buf_pool->mutex. State transitions from BUF_BLOCK_READY_FOR_USE to BUF_BLOCK_MEMORY need not be protected by buf_page_get_mutex().

See also
enum buf_page_state

Definition at line 1271 of file buf0buf.h.

◆ zip

page_zip_des_t buf_page_struct::zip

compressed page; zip.data (but not the data it points to) is also protected by buf_pool->mutex; state == BUF_BLOCK_ZIP_PAGE and zip.data == NULL means an active buf_pool->watch

Definition at line 1295 of file buf0buf.h.


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