MySQL 9.0.0
Source Code Documentation
dd::upgrade::Bootstrap_error_handler Class Reference

Bootstrap thread executes SQL statements. More...

#include <server.h>

Public Member Functions

 Bootstrap_error_handler ()
 
void set_log_error (bool log_error)
 
void set_allowlist_errors (std::set< uint > &error_codes)
 
void clear_allowlist_errors ()
 
 ~Bootstrap_error_handler ()
 

Static Public Attributes

static bool m_log_error = true
 
static bool abort_on_error = false
 
static std::set< uint > m_allowlist_errors
 

Static Private Member Functions

static void my_message_bootstrap (uint error, const char *str, myf MyFlags)
 
static void set_abort_on_error (uint error)
 
static bool should_log_error (uint error)
 

Private Attributes

ErrorHandlerFunctionPointer m_old_error_handler_hook
 

Detailed Description

Bootstrap thread executes SQL statements.

Any error in the execution of SQL statements causes call to my_error(). At this moment, error handler hook is set to my_message_stderr. my_message_stderr() prints the error messages to standard error stream but it does not follow the standard error format. Further, the error status is not set in Diagnostics Area.

This class is to create RAII error handler hooks to be used when executing statements from bootstrap thread.

It will print the error in the standard error format. Diagnostics Area error status will be set to avoid asserts. Error will be handler by caller function.

Constructor & Destructor Documentation

◆ Bootstrap_error_handler()

dd::upgrade::Bootstrap_error_handler::Bootstrap_error_handler ( )

◆ ~Bootstrap_error_handler()

dd::upgrade::Bootstrap_error_handler::~Bootstrap_error_handler ( )

Member Function Documentation

◆ clear_allowlist_errors()

void dd::upgrade::Bootstrap_error_handler::clear_allowlist_errors ( )

◆ my_message_bootstrap()

void dd::upgrade::Bootstrap_error_handler::my_message_bootstrap ( uint  error,
const char *  str,
myf  MyFlags 
)
staticprivate

◆ set_abort_on_error()

void dd::upgrade::Bootstrap_error_handler::set_abort_on_error ( uint  error)
staticprivate

◆ set_allowlist_errors()

void dd::upgrade::Bootstrap_error_handler::set_allowlist_errors ( std::set< uint > &  error_codes)

◆ set_log_error()

void dd::upgrade::Bootstrap_error_handler::set_log_error ( bool  log_error)

◆ should_log_error()

bool dd::upgrade::Bootstrap_error_handler::should_log_error ( uint  error)
staticprivate

Member Data Documentation

◆ abort_on_error

bool dd::upgrade::Bootstrap_error_handler::abort_on_error = false
static

◆ m_allowlist_errors

std::set< uint > dd::upgrade::Bootstrap_error_handler::m_allowlist_errors
static

◆ m_log_error

bool dd::upgrade::Bootstrap_error_handler::m_log_error = true
static

◆ m_old_error_handler_hook

ErrorHandlerFunctionPointer dd::upgrade::Bootstrap_error_handler::m_old_error_handler_hook
private

The documentation for this class was generated from the following files: