MXS-958: the specified binlog file is created in $binlogdir while configuring binlog server for the first time
While configuring binlog server for the first time, master.ini not existent, the specified MASTER_LOG_FILE is created in the $binlogdir. If START SLAVE command is not issued the replication can start after restarting maxscale as the binlog file exists.
This commit is contained in:
@ -1033,6 +1033,17 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
|||||||
router->master_state = BLRM_SLAVE_STOPPED;
|
router->master_state = BLRM_SLAVE_STOPPED;
|
||||||
|
|
||||||
spinlock_release(&router->lock);
|
spinlock_release(&router->lock);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The binlog server has just been configured
|
||||||
|
* master.ini file written in router->binlogdir.
|
||||||
|
* Now create the binlogfile specified in MASTER_LOG_FILE
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (blr_file_new_binlog(router, router->binlog_name))
|
||||||
|
{
|
||||||
|
MXS_INFO("%s: 'master.ini' created, binlog file '%s' created", router->service->name, router->binlog_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!router->trx_safe)
|
if (!router->trx_safe)
|
||||||
|
|||||||
Reference in New Issue
Block a user