MySQL 26.7.0
Source Code Documentation
Slot Struct Reference

The asynchronous I/O context. More...

Public Member Functions

bool is_read () const
 
void simulate_incorrect_page_read (dberr_t err)
 
 Slot ()
 
std::string to_json () const noexcept
 Serialize the object into JSON format. More...
 
std::ostream & print (std::ostream &out) const noexcept
 Print this object into the given output stream. More...
 

Public Attributes

uint16_t pos {0}
 Default constructor/assignment etc. More...
 
bool is_reserved {false}
 true if this slot is reserved More...
 
std::chrono::steady_clock::time_point reservation_time
 time when reserved More...
 
bytebuf {nullptr}
 buffer used in i/o More...
 
byteptr {nullptr}
 Buffer pointer used for actual IO. More...
 
IORequest type {IORequest::Type::UNSET}
 IO context used for the IO operation. More...
 
os_offset_t offset {0}
 file offset in bytes More...
 
pfs_os_file_t file
 file where to read or write More...
 
const char * name {nullptr}
 file name or path More...
 
bool io_already_done {false}
 used only in simulated aio: true if the physical i/o already made and only the slot message needs to be passed to the caller of os_aio_simulated_handler More...
 
std::function< void(dberr_t)> callback
 
dberr_t err {DB_ERROR_UNSET}
 AIO completion status. More...
 
ulint len {0}
 length of the block to read or write More...
 
ulint n_bytes {0}
 bytes written/read. More...
 

Detailed Description

The asynchronous I/O context.

Constructor & Destructor Documentation

◆ Slot()

Slot::Slot ( )
inline

Member Function Documentation

◆ is_read()

bool Slot::is_read ( ) const
inline

◆ print()

std::ostream & Slot::print ( std::ostream &  out) const
noexcept

Print this object into the given output stream.

Returns
the output stream into which object was printed.

◆ simulate_incorrect_page_read()

void Slot::simulate_incorrect_page_read ( dberr_t  err)

◆ to_json()

std::string Slot::to_json ( ) const
noexcept

Serialize the object into JSON format.

Returns
the object in JSON format.

Member Data Documentation

◆ buf

byte* Slot::buf {nullptr}

buffer used in i/o

◆ callback

std::function<void(dberr_t)> Slot::callback

◆ err

dberr_t Slot::err {DB_ERROR_UNSET}

AIO completion status.

◆ file

pfs_os_file_t Slot::file
Initial value:
{
IF_WIN(nullptr, 0)
}
#define IF_WIN(A, B)
Definition: my_macros.h:38

file where to read or write

◆ io_already_done

bool Slot::io_already_done {false}

used only in simulated aio: true if the physical i/o already made and only the slot message needs to be passed to the caller of os_aio_simulated_handler

◆ is_reserved

bool Slot::is_reserved {false}

true if this slot is reserved

◆ len

ulint Slot::len {0}

length of the block to read or write

◆ n_bytes

ulint Slot::n_bytes {0}

bytes written/read.

◆ name

const char* Slot::name {nullptr}

file name or path

◆ offset

os_offset_t Slot::offset {0}

file offset in bytes

◆ pos

uint16_t Slot::pos {0}

Default constructor/assignment etc.

are OK index of the slot in the aio array

◆ ptr

byte* Slot::ptr {nullptr}

Buffer pointer used for actual IO.

We advance this when partial IO is required and not buf

◆ reservation_time

std::chrono::steady_clock::time_point Slot::reservation_time

time when reserved

◆ type

IO context used for the IO operation.


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