MySQL 8.0.42
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
anonymous_namespace{buf0buf.cc} Namespace Reference

Functions

static std::ostream & operator<< (std::ostream &outs, const buf_io_fix io_fix)
 Helper iostream operator presenting the io_fix value as human-readable name of the enum. More...
 
std::ostream & operator<< (std::ostream &outs, const buf_page_state &state)
 Helper ostream operator to print buf_page_state in human-readable name of the enum. More...
 
std::ostream & operator<< (std::ostream &outs, const buf_flush_t &flush_type)
 Helper ostream operator to print buf_flush_t in human-readable name of the enum. More...
 
int64_t time_elapsed (std::chrono::steady_clock::time_point access_time)
 Print the page's access_time as duration between first access and now, or 0.0 if never accessed. More...
 

Variables

const std::unordered_map< buf_io_fix, std::string_view > buf_io_fix_str
 
const std::unordered_map< buf_flush_t, std::string_view > buf_flush_str
 

Function Documentation

◆ operator<<() [1/3]

std::ostream & anonymous_namespace{buf0buf.cc}::operator<< ( std::ostream &  outs,
const buf_flush_t flush_type 
)

Helper ostream operator to print buf_flush_t in human-readable name of the enum.

Parameters
[in,out]outsthe output stream
[in]flush_typethe flush_type to be printed
Returns
same output stream passed as input

◆ operator<<() [2/3]

static std::ostream & anonymous_namespace{buf0buf.cc}::operator<< ( std::ostream &  outs,
const buf_io_fix  io_fix 
)
static

Helper iostream operator presenting the io_fix value as human-readable name of the enum.

Used in error messages of Buf_io_fix_latching_rules.

Parameters
[in,out]outsthe output stream to which to print
[in]io_fixthe value to be printed
Returns
always equals the stream passed as the outs argument

◆ operator<<() [3/3]

std::ostream & anonymous_namespace{buf0buf.cc}::operator<< ( std::ostream &  outs,
const buf_page_state state 
)

Helper ostream operator to print buf_page_state in human-readable name of the enum.

Parameters
[in,out]outsthe output stream
[in]statethe page state to be printed
Returns
same output stream passed as input

◆ time_elapsed()

int64_t anonymous_namespace{buf0buf.cc}::time_elapsed ( std::chrono::steady_clock::time_point  access_time)

Print the page's access_time as duration between first access and now, or 0.0 if never accessed.

Parameters
[in]access_timethe time_point when page was first accessed
Returns
time elapsed since access_time

Variable Documentation

◆ buf_flush_str

const std::unordered_map<buf_flush_t, std::string_view> anonymous_namespace{buf0buf.cc}::buf_flush_str
Initial value:
{
{BUF_FLUSH_LRU, "BUF_FLUSH_LRU"},
{BUF_FLUSH_LIST, "BUF_FLUSH_LIST"},
{BUF_FLUSH_SINGLE_PAGE, "BUF_FLUSH_SINGLE_PAGE"},
{BUF_FLUSH_N_TYPES, "BUF_FLUSH_N_TYPES"}}
@ 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_io_fix_str

const std::unordered_map<buf_io_fix, std::string_view> anonymous_namespace{buf0buf.cc}::buf_io_fix_str
Initial value:
{
{BUF_IO_NONE, "BUF_IO_NONE"},
{BUF_IO_READ, "BUF_IO_READ"},
{BUF_IO_WRITE, "BUF_IO_WRITE"},
{BUF_IO_PIN, "BUF_IO_PIN"},
}
@ 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