summaryrefslogtreecommitdiff
path: root/sql/rpl_reporting.cc
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2014-06-25 15:17:03 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2014-06-25 15:17:03 +0200
commit86362129a2f70349cc79adb0825d5bc8f9a61f27 (patch)
tree85d72a6ee651f847400b98e8f1016b74dc51460e /sql/rpl_reporting.cc
parent00467e136e5080e8c175019534ad198b7dcc35d3 (diff)
downloadmariadb-git-86362129a2f70349cc79adb0825d5bc8f9a61f27.tar.gz
MDEV-6120: When slave stops with error, error message should indicate the failing GTID
If replication breaks in GTID mode, it is not trivial to determine the GTID of the failing event group. This is a problem, as such GTID is needed eg. to explicitly set @@gtid_slave_pos to skip to after that event group, or to compare errors on different servers, etc. Fix by ensuring that relevant slave errors logged to the error log include the GTID of the event group containing the problem event.
Diffstat (limited to 'sql/rpl_reporting.cc')
-rw-r--r--sql/rpl_reporting.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/rpl_reporting.cc b/sql/rpl_reporting.cc
index 96fe6242ac3..eb362941f3e 100644
--- a/sql/rpl_reporting.cc
+++ b/sql/rpl_reporting.cc
@@ -28,6 +28,7 @@ Slave_reporting_capability::Slave_reporting_capability(char const *thread_name)
void
Slave_reporting_capability::report(loglevel level, int err_code,
+ const char *extra_info,
const char *msg, ...) const
{
void (*report_function)(const char *, ...);
@@ -67,9 +68,10 @@ Slave_reporting_capability::report(loglevel level, int err_code,
va_end(args);
/* If the msg string ends with '.', do not add a ',' it would be ugly */
- report_function("Slave %s: %s%s Internal MariaDB error code: %d",
+ report_function("Slave %s: %s%s %s%sInternal MariaDB error code: %d",
m_thread_name, pbuff,
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",
+ (extra_info ? extra_info : ""), (extra_info ? ", " : ""),
err_code);
}