My Project
Classes | Public Member Functions | Public Attributes | Protected Member Functions
Slave_reporting_capability Class Reference

#include <rpl_reporting.h>

Inheritance diagram for Slave_reporting_capability:
Rpl_info Relay_log_info

List of all members.


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

Detailed Description

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.

Constructor & Destructor Documentation


thread_namePrintable name of the slave thread that is reporting.

Member Function Documentation

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.

thda 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.
1 as the positive and 0 as the negative verdict
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).

levelThe severity level
err_codeThe error code
msgThe message (usually related to the error code, but can contain more information), in printf() format.

Member Data Documentation

mysql_mutex_t Slave_reporting_capability::err_lock [mutable]

lock used to synchronize m_last_error on 'SHOW SLAVE STATUS'

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines