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:
@ -1020,7 +1020,7 @@ extern bool blr_fetch_mariadb_gtid(ROUTER_SLAVE *,
|
||||
MARIADB_GTID_INFO *);
|
||||
extern void blr_start_master_in_main(void* data);
|
||||
extern bool blr_binlog_file_exists(ROUTER_INSTANCE *router,
|
||||
const char *log_name);
|
||||
const MARIADB_GTID_INFO *info_file);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -2036,7 +2036,7 @@ blr_slave_binlog_dump(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue
|
||||
(unsigned long)slave->binlog_pos);
|
||||
|
||||
/* Check first the requested file exists */
|
||||
if (!blr_binlog_file_exists(router, slave->binlogfile))
|
||||
if (!blr_binlog_file_exists(router, &slave->f_info))
|
||||
{
|
||||
char errmsg[BINLOG_ERROR_MSG_LEN + 1];
|
||||
|
||||
|
Reference in New Issue
Block a user