2
#include "mysql_priv.h"
3
#include "rpl_reporting.h"
6
Slave_reporting_capability::report(loglevel level, int err_code,
7
const char *msg, ...) const
9
void (*report_function)(const char *, ...);
10
char buff[MAX_SLAVE_ERRMSG];
12
uint pbuffsize= sizeof(buff);
20
It's an error, it must be reported in Last_error and Last_errno in SHOW
23
pbuff= m_last_error.message;
24
pbuffsize= sizeof(m_last_error.message);
25
m_last_error.number = err_code;
26
report_function= sql_print_error;
29
report_function= sql_print_warning;
31
case INFORMATION_LEVEL:
32
report_function= sql_print_information;
35
DBUG_ASSERT(0); // should not come here
36
return; // don't crash production builds, just do nothing
39
my_vsnprintf(pbuff, pbuffsize, msg, args);
43
/* If the msg string ends with '.', do not add a ',' it would be ugly */
44
report_function("Slave %s: %s%s Error_code: %d",
46
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",