1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-20428: "Start binlog_dump" message doesn't indicate GTID position

Problem:
=======
The "Start binlog_dump" message hasn't been updated to include the slave's
requested GTID position:

20:05:05 139836760311552 [Note] Start binlog_dump to slave_server(2), pos(, 4)

For diagnostic purposes, it would be helpful if the GTID position were
included.

Fix:
===
Imporve "Start binlog_dump" print message to include "using_gtid" and
"GTID position" requested by slave.

Ex:
[Note] Start binlog_dump to slave_server(2), pos(, 4), using_gtid(1),
  gtid('1-1-201,2-2-100')

[Note] Start binlog_dump to slave_server(3), pos('mariadb-bin.004142',
  507988273), using_gtid(0), gtid('')
This commit is contained in:
Sujatha
2020-06-15 15:57:01 +05:30
parent 93cee30309
commit bf74f7f9ff
3 changed files with 161 additions and 2 deletions

View File

@@ -2027,9 +2027,13 @@ static int init_binlog_sender(binlog_send_info *info,
});
if (global_system_variables.log_warnings > 1)
{
sql_print_information(
"Start binlog_dump to slave_server(%lu), pos(%s, %lu)",
thd->variables.server_id, log_ident, (ulong)*pos);
"Start binlog_dump to slave_server(%lu), pos(%s, %lu), "
"using_gtid(%d), gtid('%s')", thd->variables.server_id,
log_ident, (ulong)*pos, info->using_gtid_state,
connect_gtid_state.c_ptr_quick());
}
#ifndef DBUG_OFF
if (opt_sporadic_binlog_dump_fail && (binlog_dump_count++ % 2))