diff --git a/Documentation/Routers/Binlogrouter.md b/Documentation/Routers/Binlogrouter.md index 80292a1e8..b29b2de6e 100644 --- a/Documentation/Routers/Binlogrouter.md +++ b/Documentation/Routers/Binlogrouter.md @@ -32,15 +32,15 @@ following options should be given as a value to the `router_options` parameter. ### `binlogdir` -This parameter controls the location where MariaDB MaxScale stores the binary log -files. If this parameter is not set to a directory name then MariaDB -MaxScale will store the binlog files in the directory -`/var/cache/maxscale/` where `` is the name of the -service in the configuration file. The _binlogdir_ also contains the -_cache_ subdirectory which stores data retrieved from the master during the slave -registration phase. The master.ini file also resides in the _binlogdir_. This -file keeps track of the current master configuration and it is updated when a -`CHANGE MASTER TO` query is executed. +This parameter controls the location where MariaDB MaxScale stores the binary +log files. If this parameter is not set to a directory name then MariaDB +MaxScale will store the binlog files in the directory `/var/lib/maxscale/`. + +The _binlogdir_ also contains the _cache_ subdirectory which stores data +retrieved from the master during the slave registration phase. The master.ini +file also resides in the _binlogdir_. This file keeps track of the current +master configuration and it is updated when a `CHANGE MASTER TO` query is +executed. From 2.1 onwards, the 'cache' directory is stored in the same location as other user credential caches. This means that with the default options, the user @@ -159,7 +159,9 @@ the router options. ### `mariadb10-compatibility` This parameter allows binlogrouter to replicate from a MariaDB 10.0 master -server. GTID will not be used in the replication. +server. If `mariadb10_slave_gtid` is not enabled GTID will not be used in the +replication. This parameter is enabled by default since MaxScale 2.2.0. In +earlier versions the parameter was disabled by default. ``` # Example diff --git a/server/modules/routing/binlogrouter/blr.c b/server/modules/routing/binlogrouter/blr.c index 307115cef..8bf92543a 100644 --- a/server/modules/routing/binlogrouter/blr.c +++ b/server/modules/routing/binlogrouter/blr.c @@ -50,6 +50,7 @@ #include #include #include +#include /* 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