MXS-1266: files are saved in GTID repo at creation time

Files are saved in GTID repo at creation time: this allows to show
files without transactions via SHOW [FULL] BINARY LOGS

The FULL keywords add domain_id and server id to the output as file
prefix: 0/10122/mysql-bin.000080
This commit is contained in:
MassimilianoPinto
2017-05-29 10:58:02 +02:00
parent a6e4ff1c10
commit f66623c382
5 changed files with 111 additions and 20 deletions

View File

@ -649,6 +649,8 @@ createInstance(SERVICE *service, char **options)
MXS_ERROR("%s: Error: No router options supplied for binlogrouter", service->name);
}
inst->orig_masterid = 0;
if (inst->masterid)
{
inst->set_master_server_id = true;
@ -3126,7 +3128,7 @@ static bool blr_open_gtid_maps_storage(ROUTER_INSTANCE *inst)
"start_pos BIGINT, "
"end_pos BIGINT);"
"CREATE UNIQUE INDEX IF NOT EXISTS gtid_index "
"ON gtid_maps(rep_domain, server_id, sequence);"
"ON gtid_maps(rep_domain, server_id, sequence, binlog_file);"
"COMMIT;",
NULL, NULL, &errmsg);
if (rc != SQLITE_OK)