My Project
|
#include <rpl_reporting.h>
Classes | |
class | Error |
Public Member Functions | |
Slave_reporting_capability (char const *thread_name) | |
virtual void | report (loglevel level, int err_code, const char *msg,...) const ATTRIBUTE_FORMAT(printf |
virtual void void | va_report (loglevel level, int err_code, const char *prefix_msg, const char *msg, va_list v_args) const |
void | clear_error () |
int | has_temporary_error (THD *thd, uint error_arg=0, bool *silent=0) const |
Error const & | last_error () const |
bool | is_error () const |
Public Attributes | |
mysql_mutex_t | err_lock |
Protected Member Functions | |
virtual void | do_report (loglevel level, int err_code, const char *msg, va_list v_args) const |
Mix-in to handle the message logging and reporting for relay log info and master log info structures.
By inheriting from this class, the class is imbued with capabilities to do slave reporting.
Slave_reporting_capability::Slave_reporting_capability | ( | char const * | thread_name | ) |
Constructor.
thread_name | Printable name of the slave thread that is reporting. |
void Slave_reporting_capability::clear_error | ( | ) | [inline] |
Clear errors. They will not show up under SHOW SLAVE STATUS
.
int Slave_reporting_capability::has_temporary_error | ( | THD * | thd, |
uint | error_arg = 0 , |
||
bool * | silent = 0 |
||
) | const |
Check if the current error is of temporary nature or not.
Check if the current error is of temporary nature or not. Some errors are temporary in nature, such as ER_LOCK_DEADLOCK and ER_LOCK_WAIT_TIMEOUT. Ndb also signals that the error is temporary by pushing a warning with the error code ER_GET_TEMPORARY_ERRMSG, if the originating error is temporary.
thd | a THD instance, typically of the slave SQL thread's. the error code for assessment. defaults to zero which makes the function check the top of the reported errors stack. bool indicating whether the error should be silently handled. |
void Slave_reporting_capability::report | ( | loglevel | level, |
int | err_code, | ||
const char * | msg, | ||
... | |||
) | const [virtual] |
Writes a message and, if it's an error message, to Last_Error (which will be displayed by SHOW SLAVE STATUS).
level | The severity level |
err_code | The error code |
msg | The message (usually related to the error code, but can contain more information), in printf() format. |
mysql_mutex_t Slave_reporting_capability::err_lock [mutable] |
lock used to synchronize m_last_error on 'SHOW SLAVE STATUS'