Update binlogrouter defaults

The documentation stated that the binlogrouter would use the cache
directory to store the binary log files. In reality, there was no default
value and the service would fail to start without a binlogdir parameter.

The router now uses the data directory (/var/lib/maxscale/) to store the
binary logs.

Set the default value of mariadb10-compatibility to true. This is in line
with the fact that most installations should use the router with a MariaDB
10.0 server or newer.
This commit is contained in:
Markus Mäkelä
2017-09-25 08:26:51 +03:00
parent 18b0d3575e
commit 45b78a795e
2 changed files with 15 additions and 19 deletions

View File

@ -50,6 +50,7 @@
#include <maxscale/users.h>
#include <maxscale/utils.h>
#include <maxscale/worker.h>
#include <maxscale/paths.h>
/* The router entry points */
static MXS_ROUTER *createInstance(SERVICE *service, char **options);
@ -177,7 +178,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
{"master_version", MXS_MODULE_PARAM_STRING},
{"master_hostname", MXS_MODULE_PARAM_STRING},
{"slave_hostname", MXS_MODULE_PARAM_STRING},
{"mariadb10-compatibility", MXS_MODULE_PARAM_BOOL, "false"},
{"mariadb10-compatibility", MXS_MODULE_PARAM_BOOL, "true"},
{"maxwell-compatibility", MXS_MODULE_PARAM_BOOL, "false"},
{"filestem", MXS_MODULE_PARAM_STRING, BINLOG_NAME_ROOT},
{"file", MXS_MODULE_PARAM_COUNT, "1"},
@ -201,7 +202,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
{
"binlogdir",
MXS_MODULE_PARAM_PATH,
NULL,
MXS_DEFAULT_DATADIR,
MXS_MODULE_OPT_PATH_R_OK |
MXS_MODULE_OPT_PATH_W_OK |
MXS_MODULE_OPT_PATH_CREAT
@ -246,13 +247,6 @@ createInstance(SERVICE *service, char **options)
return NULL;
}
if (options == NULL || options[0] == NULL)
{
MXS_ERROR("%s: Error: No router options supplied for binlogrouter",
service->name);
return NULL;
}
/*
* We only support one server behind this router, since the server is
* the master from which we replicate binlog records. Therefore check