1
#include <drizzled/server_includes.h>
2
#include "rpl_reporting.h"
5
Slave_reporting_capability::report(loglevel level, int err_code,
6
const char *msg, ...) const
8
void (*report_function)(const char *, ...);
9
char buff[MAX_SLAVE_ERRMSG];
11
uint pbuffsize= sizeof(buff);
19
It's an error, it must be reported in Last_error and Last_errno in SHOW
22
pbuff= m_last_error.message;
23
pbuffsize= sizeof(m_last_error.message);
24
m_last_error.number = err_code;
25
report_function= sql_print_error;
28
report_function= sql_print_warning;
30
case INFORMATION_LEVEL:
31
report_function= sql_print_information;
34
assert(0); // should not come here
35
return; // don't crash production builds, just do nothing
38
vsnprintf(pbuff, pbuffsize, msg, args);
42
/* If the msg string ends with '.', do not add a ',' it would be ugly */
43
report_function(_("Slave %s: %s%s Error_code: %d"),
45
(pbuff[0] && *(strchr(pbuff, '\0')-1) == '.') ? "" : ",",