MXS-1545: use GTID file info in blr_binlog_file_exists

MXS-1545: use GTID file info in blr_binlog_file_exists instead of log
filename
This commit is contained in:
MassimilianoPinto
2017-11-27 09:51:07 +01:00
parent a72956e2f3
commit e9cf0c0f86
3 changed files with 7 additions and 3 deletions

View File

@ -4471,7 +4471,7 @@ bool blr_is_current_binlog(ROUTER_INSTANCE *router,
*
*/
bool blr_binlog_file_exists(ROUTER_INSTANCE *router,
const char *log_file)
const MARIADB_GTID_INFO *info_file)
{
bool ret = true;
char path[PATH_MAX + 1] = "";
@ -4487,7 +4487,11 @@ bool blr_binlog_file_exists(ROUTER_INSTANCE *router,
// Add prefix
sprintf(prefix,
"%" PRIu32 "/%" PRIu32 "/",
info_file ?
info_file->gtid_elms.domain_id :
router->mariadb10_gtid_domain,
info_file ?
info_file->gtid_elms.server_id :
router->orig_masterid);
strcat(path, prefix);
}