1
#ifndef RPL_REPORTING_H
2
#define RPL_REPORTING_H
5
Maximum size of an error message from a slave thread.
7
#define MAX_SLAVE_ERRMSG 1024
10
Mix-in to handle the message logging and reporting for relay log
11
info and master log info structures.
13
By inheriting from this class, the class is imbued with
14
capabilities to do slave reporting.
16
class Slave_reporting_capability
22
@param thread_name Printable name of the slave thread that is reporting.
24
Slave_reporting_capability(char const *thread_name)
25
: m_thread_name(thread_name)
30
Writes a message and, if it's an error message, to Last_Error
31
(which will be displayed by SHOW SLAVE STATUS).
33
@param level The severity level
34
@param err_code The error code
35
@param msg The message (usually related to the error
36
code, but can contain more information), in
39
void report(loglevel level, int err_code, const char *msg, ...) const
40
ATTRIBUTE_FORMAT(printf, 4, 5);
43
Clear errors. They will not show up under <code>SHOW SLAVE
51
Error information structure.
54
friend class Slave_reporting_capability;
70
char message[MAX_SLAVE_ERRMSG];
73
Error const& last_error() const { return m_last_error; }
77
Last error produced by the I/O or SQL thread respectively.
79
mutable Error m_last_error;
81
char const *const m_thread_name;
84
#endif // RPL_REPORTING_H