diff --git a/Documentation/Routers/Binlogrouter.md b/Documentation/Routers/Binlogrouter.md index 69a11b4c3..f209c7027 100644 --- a/Documentation/Routers/Binlogrouter.md +++ b/Documentation/Routers/Binlogrouter.md @@ -296,13 +296,13 @@ Example: ``` ### `mariadb10_master_gtid` -This option allows MaxScale binlog router to register -with MariaDB 10.X master using GTID instead of _binlog_file_ name -and _position_ in CHANGE MASTER TO admin command. -The user can set a known GTID or an empty value -(in this case the Master server will send events -from it's first available binlog file). +This option allows MaxScale binlog router to register with MariaDB 10.X master +using GTID instead of _binlog_file_ name and _position_ in CHANGE MASTER TO +admin command. This feature is disabled by default. + +The user can set a known GTID or an empty value (in this case the Master server +will send events from it's first available binlog file). Example of MaxScale connection to a MariaDB 10.X Master @@ -316,13 +316,13 @@ MariaDB> CHANGE MASTER TO MariaDB> START SLAVE; ``` -If using GTID request then it's no longer possible to use -MASTER_LOG_FILE and MASTER_LOG_POS in `CHANGE MASTER TO` -command: an error will be reported. +If using GTID request then it's no longer possible to use MASTER_LOG_FILE and +MASTER_LOG_POS in `CHANGE MASTER TO` command: an error will be reported. -The default option value is _Off_, setting it to _On_ -automatically sets _mariadb10_slave_gtid_ to _On_ -(which enables GTID storage and GTID slave connections) +If this feature is enabled, the _mariadb10_slave_gtid_ and +_transaction_safety_ features will be automatically enabled. The binlog +files will also be stored in a hierarchical directory tree instead of a +single directory. **Note:** diff --git a/server/modules/routing/binlogrouter/blr.c b/server/modules/routing/binlogrouter/blr.c index e7c485b67..522dd8f99 100644 --- a/server/modules/routing/binlogrouter/blr.c +++ b/server/modules/routing/binlogrouter/blr.c @@ -770,6 +770,8 @@ createInstance(SERVICE *service, char **options) { /* Force GTID slave request handling */ inst->mariadb10_gtid = true; + /* Force transaction safety */ + inst->trx_safe = true; /* Force binlog storage as tree */ inst->storage_type = BLR_BINLOG_STORAGE_TREE; } @@ -782,18 +784,8 @@ createInstance(SERVICE *service, char **options) "'tree' mode using GTID domain_id and server_id"); /* Enable MariaDB the GTID maps store */ - if (inst->mariadb10_compat && - inst->mariadb10_gtid) + if (inst->mariadb10_compat && inst->mariadb10_master_gtid) { - if (!inst->trx_safe) - { - MXS_ERROR("MariaDB GTID can be enabled only" - " with Transaction Safety feature." - " Please enable it with option 'transaction_safety = on'"); - free_instance(inst); - return NULL; - } - /* Create/Open R/W GTID sqlite3 storage */ if (!blr_open_gtid_maps_storage(inst)) {