From 729e9dbbaea4ee208931671eac08abd36b37d8b3 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Mon, 3 Jul 2017 18:14:20 +0200 Subject: [PATCH] Added FAKE_ROTATE event info log Added FAKE_ROTATE event info log. Changed: log of Request file and pos only if the binlog_name is not empty (it can be empty when setting the GTID value before CHANGE MASTER TO) --- .../modules/routing/binlogrouter/blr_master.c | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/server/modules/routing/binlogrouter/blr_master.c b/server/modules/routing/binlogrouter/blr_master.c index 53b3a75b3..edbdd7a0a 100644 --- a/server/modules/routing/binlogrouter/blr_master.c +++ b/server/modules/routing/binlogrouter/blr_master.c @@ -1386,6 +1386,11 @@ blr_handle_binlog_record(ROUTER_INSTANCE *router, GWBUF *pkt) blr_master_delayed_connect(router); return; } + + MXS_INFO("Fake ROTATE_EVENT received: " + "binlog file %s, pos %" PRIu64 "", + router->binlog_name, + router->current_pos); } else if (hdr.event_type == MARIADB10_GTID_GTID_LIST_EVENT) { @@ -3056,12 +3061,15 @@ static void blr_start_master_registration(ROUTER_INSTANCE *router, GWBUF *buf) router->master_state = BLRM_BINLOGDUMP; router->master->func.write(router->master, buf); - MXS_NOTICE("%s: Request binlog records from %s at " - "position %lu from master server [%s]:%d", - router->service->name, router->binlog_name, - router->current_pos, - router->service->dbref->server->name, - router->service->dbref->server->port); + if (router->binlog_name[0]) + { + MXS_NOTICE("%s: Request binlog records from %s at " + "position %lu from master server [%s]:%d", + router->service->name, router->binlog_name, + router->current_pos, + router->service->dbref->server->name, + router->service->dbref->server->port); + } /* Log binlog router identity */ blr_log_identity(router);