Merge branch '1.2.1-binlog_router_trx' of https://github.com/mariadb-corporation/MaxScale into 1.2.1-binlog_router_trx
This commit is contained in:
@ -298,11 +298,16 @@ char task_name[BLRM_TASK_NAME_LEN+1] = "";
|
||||
{
|
||||
my_uuid(defuuid);
|
||||
if ((inst->uuid = (char *)malloc(38)) != NULL)
|
||||
sprintf(inst->uuid, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
defuuid[0], defuuid[1], defuuid[2], defuuid[3],
|
||||
defuuid[4], defuuid[5], defuuid[6], defuuid[7],
|
||||
defuuid[8], defuuid[9], defuuid[10], defuuid[11],
|
||||
defuuid[12], defuuid[13], defuuid[14], defuuid[15]);
|
||||
sprintf(inst->uuid,
|
||||
"%02hhx%02hhx%02hhx%02hhx-"
|
||||
"%02hhx%02hhx-"
|
||||
"%02hhx%02hhx-"
|
||||
"%02hhx%02hhx-"
|
||||
"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx",
|
||||
defuuid[0], defuuid[1], defuuid[2], defuuid[3],
|
||||
defuuid[4], defuuid[5], defuuid[6], defuuid[7],
|
||||
defuuid[8], defuuid[9], defuuid[10], defuuid[11],
|
||||
defuuid[12], defuuid[13], defuuid[14], defuuid[15]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3229,6 +3229,10 @@ int blr_handle_change_master(ROUTER_INSTANCE* router, char *command, char *error
|
||||
router->binlog_position = 4;
|
||||
router->current_safe_event = 4;
|
||||
|
||||
/* close current file binlog file, next start slave will create the new one */
|
||||
fsync(router->binlog_fd);
|
||||
close(router->binlog_fd);
|
||||
|
||||
LOGIF(LT, (skygw_log_write(LOGFILE_TRACE, "%s: New MASTER_LOG_FILE is [%s]",
|
||||
router->service->name,
|
||||
router->binlog_name)));
|
||||
|
Reference in New Issue
Block a user