With GTID master registration always get filename from GTID repo
With GTID master registration always get filename from GTID repo. The filestem option is not written if binlog_name is not set: this is not needed by GTID registration. router->fileroot is set when last name is loaded from GTID repo.
This commit is contained in:
@ -328,7 +328,7 @@ blr_file_init(ROUTER_INSTANCE *router)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* - 1 - try to find a binlog file number by reading the directory */
|
/* - 1 - try to find a binlog file number by reading the directory */
|
||||||
if (router->storage_type == BLR_BINLOG_STORAGE_FLAT)
|
if (!router->mariadb10_master_gtid)
|
||||||
{
|
{
|
||||||
root_len = strlen(router->fileroot);
|
root_len = strlen(router->fileroot);
|
||||||
if ((dirp = opendir(path)) == NULL)
|
if ((dirp = opendir(path)) == NULL)
|
||||||
@ -3133,7 +3133,12 @@ blr_file_write_master_config(ROUTER_INSTANCE *router, char *error)
|
|||||||
fprintf(config_file, "master_port=%d\n", router->service->dbref->server->port);
|
fprintf(config_file, "master_port=%d\n", router->service->dbref->server->port);
|
||||||
fprintf(config_file, "master_user=%s\n", router->user);
|
fprintf(config_file, "master_user=%s\n", router->user);
|
||||||
fprintf(config_file, "master_password=%s\n", router->password);
|
fprintf(config_file, "master_password=%s\n", router->password);
|
||||||
|
|
||||||
|
/* write filestem only if binlog file is set */
|
||||||
|
if (*router->binlog_name != 0)
|
||||||
|
{
|
||||||
fprintf(config_file, "filestem=%s\n", router->fileroot);
|
fprintf(config_file, "filestem=%s\n", router->fileroot);
|
||||||
|
}
|
||||||
|
|
||||||
/* Add SSL options */
|
/* Add SSL options */
|
||||||
if (router->ssl_enabled)
|
if (router->ssl_enabled)
|
||||||
|
Reference in New Issue
Block a user