24#ifndef RPL_REPORTING_H
25#define RPL_REPORTING_H
42#define MAX_SLAVE_ERRMSG 1024
74 virtual void report(
loglevel level,
int err_code,
const char *msg, ...) const
75 MY_ATTRIBUTE((format(printf, 4, 5)));
77 const
char *msg, va_list v_args) const
78 MY_ATTRIBUTE((format(printf, 5, 0)));
94 bool *
silent =
nullptr)
const;
117 tt_tmp =
skr / 1000000;
118 localtime_r(&tt_tmp, &tm_tmp);
154 va_list v_args)
const
155 MY_ATTRIBUTE((format(printf, 4, 0)));
172 va_list v_args)
const {
173 va_report(level, err_code,
nullptr, msg, v_args);
Error information structure.
Definition: rpl_reporting.h:99
char message[MAX_SLAVE_ERRMSG]
Error message.
Definition: rpl_reporting.h:130
char timestamp[64]
Error timestamp as string.
Definition: rpl_reporting.h:132
Error()
Definition: rpl_reporting.h:103
void clear()
Definition: rpl_reporting.h:105
void update_timestamp()
Definition: rpl_reporting.h:111
ulonglong skr
Error timestamp in microseconds.
Definition: rpl_reporting.h:134
uint32 number
Error code.
Definition: rpl_reporting.h:128
Mix-in to handle the message logging and reporting for relay log info and master log info structures.
Definition: rpl_reporting.h:53
Error const & last_error() const
Definition: rpl_reporting.h:137
virtual void do_report(loglevel level, int err_code, const char *msg, va_list v_args) const
Definition: rpl_reporting.h:170
Slave_reporting_capability(char const *thread_name)
Constructor.
Definition: rpl_reporting.cc:42
Slave_reporting_capability(const Slave_reporting_capability &rhs)
Slave_reporting_capability & operator=(const Slave_reporting_capability &rhs)
virtual const char * get_for_channel_str(bool upper_case) const =0
mysql_mutex_t err_lock
lock used to synchronize m_last_error on 'SHOW SLAVE STATUS'
Definition: rpl_reporting.h:56
void va_report(loglevel level, int err_code, const char *prefix_msg, const char *msg, va_list v_args) const
Definition: rpl_reporting.cc:125
virtual void report(loglevel level, int err_code, const char *msg,...) const
Writes a message and, if it's an error message, to Last_Error (which will be displayed by SHOW SLAVE ...
Definition: rpl_reporting.cc:117
int has_temporary_error(THD *thd, uint error_arg=0, bool *silent=nullptr) const
Check if the current error is of temporary nature or not.
Definition: rpl_reporting.cc:67
void clear_error()
Clear errors.
Definition: rpl_reporting.h:84
bool is_error() const
Definition: rpl_reporting.h:138
virtual ~Slave_reporting_capability()=0
Definition: rpl_reporting.cc:191
Error m_last_error
Last error produced by the I/O or SQL thread respectively.
Definition: rpl_reporting.h:160
char const *const m_thread_name
Definition: rpl_reporting.h:163
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:177
Header for compiler-dependent features.
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint32_t uint32
Definition: my_inttypes.h:67
Definition of the global "loglevel" enumeration.
loglevel
Definition: my_loglevel.h:41
Defines for getting and processing the current system type programmatically.
unsigned long long int my_getsystime()
Get high-resolution time.
Definition: my_systime.h:102
ABI for instrumented mutexes.
static bool silent
Definition: mysqlimport.cc:66
Instrumentation helpers for mutexes.
#define MAX_SLAVE_ERRMSG
Maximum size of an error message from a slave thread.
Definition: rpl_reporting.h:42
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Include file for Sun RPC to compile out of the box.
unsigned int uint
Definition: uca9-dump.cc:75