Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
In case of error a BINLOG '...' "pseudo"-query is logged into the error log prefixed
as if it's done by a slave applier thread. E.g
2020-03-01 20:08:03 18 [ERROR] Slave SQL: Could not execute Write_rows_v1 event
|
In this case it can be only a plain connection user so the apparent ambiguity needs
to be fixed.
Something like the following block
--- a/sql/sql_binlog.cc
|
+++ b/sql/sql_binlog.cc
|
@@ -210,7 +210,7 @@ void mysql_client_binlog_statement(THD* thd) |
size_t coded_len= 0, decoded_len= 0; |
|
rli= thd->rli_fake;
|
- if (!rli && (rli= thd->rli_fake= new Relay_log_info(FALSE))) |
+ if (!rli && (rli= thd->rli_fake= new Relay_log_info(FALSE, "BINLOG_BASE64_EVENT"))) |
rli->sql_driver_thd= thd;
|
if (!(rgi= thd->rgi_fake)) |
rgi= thd->rgi_fake= new rpl_group_info(rli); |
accompanied with changes in reporting function, like
@@ -76,7 +71,8 @@ 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 %s%sInternal MariaDB error code: %d", |
+ report_function("%s %s: %s%s %s%sInternal MariaDB error code: %d", |
+ (current_thd && current_thd->rgi_fake) ? "" : "Slave", |
m_thread_name, pbuff,
|
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",", |
(extra_info ? extra_info : ""), (extra_info ? ", " : ""), |
|