MySQL 8.0.31
Source Code Documentation
ib Namespace Reference

Classes

class  error
 The class error is used to emit error messages. More...
 
class  error_or_warn
 Emit an error message if the given predicate is true, otherwise emit a warning message. More...
 
class  fatal
 The class fatal is used to emit an error message and stop the server by crashing it. More...
 
class  fatal_or_error
 Emit a fatal message if the given predicate is true, otherwise emit a error message. More...
 
struct  hex
 This is a wrapper class, used to print any unsigned integer type in hexadecimal format. More...
 
class  info
 The class info is used to emit informational log messages. More...
 
class  logger
 The class logger is the base class of all the error log related classes. More...
 
struct  Tester
 This class contains implementations of the commands that can be executed at server side by passing them via the innodb_interpreter system variable. More...
 
class  Throttler
 Allows to monitor an event processing times, allowing to throttle the processing to one per THROTTLE_DELAY_SEC. More...
 
class  Timer
 For measuring time elapsed. More...
 
class  warn
 The class warn is used to emit warnings. More...
 

Typedefs

typedef Tester::Ret_t Ret_t
 

Functions

static const char * get_first_format (const char *fmt)
 Finds the first format specifier in fmt format string. More...
 
static bool verify_fmt_match (const char *fmt)
 Verifies that the fmt format string does not require any arguments. More...
 
template<typename Head , typename... Tail>
static bool verify_fmt_match (const char *fmt, Head &&head, Tail &&... tail)
 Verifies that the fmt format string contains format specifiers which match the type and order of the arguments. More...
 
std::ostream & operator<< (std::ostream &lhs, const hex &rhs)
 This is an overload of the global operator<< for the user defined type ib::hex. More...
 
static auto log_info ()
 
static auto log_warn ()
 
static auto log_error ()
 
static auto log_fatal (ut::Location location)
 
static auto log_error_or_warn (bool pred)
 
static auto log_fatal_or_error (bool fatal, ut::Location location)
 
template<typename... Args>
static auto log_info (int err, Args &&... args)
 
template<typename... Args>
static auto log_warn (int err, Args &&... args)
 
template<typename... Args>
static auto log_error (int err, Args &&... args)
 
template<typename... Args>
static auto log_fatal (ut::Location location, int err, Args &&... args)
 
template<typename... Args>
static auto log_error_or_warn (bool pred, int err, Args &&... args)
 
template<typename... Args>
static auto log_fatal_or_error (bool fatal, ut::Location location, int err, Args &&... args)
 
int interpreter_run (const char *command) noexcept
 The main function to execute the commands in the tester. More...
 
void scan_page_type (space_id_t space_id, std::map< page_type_t, page_no_t > &result_map)
 
 DISPATCH_FUNCTION_DEF (Tester::count_page_type)
 
 DISPATCH_FUNCTION_DEF (Tester::count_used_and_free)
 
 DISPATCH_FUNCTION_DEF (Tester::find_tablespace_physical_page_size)
 
 DISPATCH_FUNCTION_DEF (Tester::make_ondisk_root_page_zeroes)
 
 DISPATCH_FUNCTION_DEF (Tester::dblwr_force_crash)
 
 DISPATCH_FUNCTION_DEF (Tester::make_page_dirty)
 

Variables

thread_local Tester tl_interpreter
 

Typedef Documentation

◆ Ret_t

Function Documentation

◆ DISPATCH_FUNCTION_DEF() [1/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::count_page_type  )

◆ DISPATCH_FUNCTION_DEF() [2/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::count_used_and_free  )

◆ DISPATCH_FUNCTION_DEF() [3/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::dblwr_force_crash  )

◆ DISPATCH_FUNCTION_DEF() [4/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::find_tablespace_physical_page_size  )

◆ DISPATCH_FUNCTION_DEF() [5/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::make_ondisk_root_page_zeroes  )

◆ DISPATCH_FUNCTION_DEF() [6/6]

ib::DISPATCH_FUNCTION_DEF ( Tester::make_page_dirty  )

◆ get_first_format()

static const char * ib::get_first_format ( const char *  fmt)
inlinestatic

Finds the first format specifier in fmt format string.

Parameters
[in]fmtThe format string
Returns
Either the longest suffix of fmt which starts with format specifier, or nullptr if could not find any format specifier inside fmt.

◆ interpreter_run()

int ib::interpreter_run ( const char *  command)
noexcept

The main function to execute the commands in the tester.

Parameters
[in]commandthe command to execute.
Returns
the error code.

◆ log_error() [1/2]

static auto ib::log_error ( )
inlinestatic

◆ log_error() [2/2]

template<typename... Args>
static auto ib::log_error ( int  err,
Args &&...  args 
)
inlinestatic

◆ log_error_or_warn() [1/2]

static auto ib::log_error_or_warn ( bool  pred)
inlinestatic

◆ log_error_or_warn() [2/2]

template<typename... Args>
static auto ib::log_error_or_warn ( bool  pred,
int  err,
Args &&...  args 
)
inlinestatic

◆ log_fatal() [1/2]

static auto ib::log_fatal ( ut::Location  location)
inlinestatic

◆ log_fatal() [2/2]

template<typename... Args>
static auto ib::log_fatal ( ut::Location  location,
int  err,
Args &&...  args 
)
inlinestatic

◆ log_fatal_or_error() [1/2]

static auto ib::log_fatal_or_error ( bool  fatal,
ut::Location  location 
)
inlinestatic

◆ log_fatal_or_error() [2/2]

template<typename... Args>
static auto ib::log_fatal_or_error ( bool  fatal,
ut::Location  location,
int  err,
Args &&...  args 
)
inlinestatic

◆ log_info() [1/2]

static auto ib::log_info ( )
inlinestatic

◆ log_info() [2/2]

template<typename... Args>
static auto ib::log_info ( int  err,
Args &&...  args 
)
inlinestatic

◆ log_warn() [1/2]

static auto ib::log_warn ( )
inlinestatic

◆ log_warn() [2/2]

template<typename... Args>
static auto ib::log_warn ( int  err,
Args &&...  args 
)
inlinestatic

◆ operator<<()

std::ostream & ib::operator<< ( std::ostream &  lhs,
const hex rhs 
)
inline

This is an overload of the global operator<< for the user defined type ib::hex.

The unsigned value held in the ib::hex wrapper class will be printed into the given output stream in hexadecimal format.

Parameters
[in,out]lhsthe output stream into which rhs is written.
[in]rhsthe object to be written into lhs.
Return values
referenceto the output stream.

◆ scan_page_type()

void ib::scan_page_type ( space_id_t  space_id,
std::map< page_type_t, page_no_t > &  result_map 
)

◆ verify_fmt_match() [1/2]

static bool ib::verify_fmt_match ( const char *  fmt)
inlinestatic

Verifies that the fmt format string does not require any arguments.

Parameters
[in]fmtThe format string
Returns
true if and only if there is no format specifier inside fmt which requires passing an argument

◆ verify_fmt_match() [2/2]

template<typename Head , typename... Tail>
static bool ib::verify_fmt_match ( const char *  fmt,
Head &&  head,
Tail &&...  tail 
)
static

Verifies that the fmt format string contains format specifiers which match the type and order of the arguments.

Parameters
[in]fmtThe format string
[in]headThe first argument
[in]tailOthers (perhaps none) arguments
Returns
true if and only if the format specifiers found in fmt correspond to types of head, tail...

Variable Documentation

◆ tl_interpreter

thread_local Tester ib::tl_interpreter