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)
This commit is contained in:
MassimilianoPinto
2017-07-03 18:14:20 +02:00
parent e181241f45
commit 729e9dbbae

View File

@ -1386,6 +1386,11 @@ blr_handle_binlog_record(ROUTER_INSTANCE *router, GWBUF *pkt)
blr_master_delayed_connect(router); blr_master_delayed_connect(router);
return; 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) 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_state = BLRM_BINLOGDUMP;
router->master->func.write(router->master, buf); router->master->func.write(router->master, buf);
if (router->binlog_name[0])
{
MXS_NOTICE("%s: Request binlog records from %s at " MXS_NOTICE("%s: Request binlog records from %s at "
"position %lu from master server [%s]:%d", "position %lu from master server [%s]:%d",
router->service->name, router->binlog_name, router->service->name, router->binlog_name,
router->current_pos, router->current_pos,
router->service->dbref->server->name, router->service->dbref->server->name,
router->service->dbref->server->port); router->service->dbref->server->port);
}
/* Log binlog router identity */ /* Log binlog router identity */
blr_log_identity(router); blr_log_identity(router);