MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Slave_reporting_capability Class Reference

#include <rpl_reporting.h>

Inheritance diagram for Slave_reporting_capability:
Collaboration diagram for Slave_reporting_capability:

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

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.

Definition at line 38 of file rpl_reporting.h.

Constructor & Destructor Documentation

Slave_reporting_capability::Slave_reporting_capability ( char const *  thread_name)

Constructor.

Parameters
thread_namePrintable name of the slave thread that is reporting.

Definition at line 22 of file rpl_reporting.cc.

Member Function Documentation

void Slave_reporting_capability::clear_error ( )
inline

Clear errors. They will not show up under SHOW SLAVE STATUS.

Definition at line 69 of file rpl_reporting.h.

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.

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

Definition at line 45 of file rpl_reporting.cc.

Here is the call graph for this function:

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).

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

Definition at line 110 of file rpl_reporting.cc.

Here is the caller graph for this function:

Member Data Documentation

mysql_mutex_t Slave_reporting_capability::err_lock
mutable

lock used to synchronize m_last_error on 'SHOW SLAVE STATUS'

Definition at line 42 of file rpl_reporting.h.


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