From a0ea37b2c5cc967b7038b71732601684a252499a Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 4 Sep 2018 14:35:29 +0300 Subject: [PATCH] MXS-2011 Fix documentation and comments Fix documentation and comment based upon review comments. --- Documentation/Routers/Binlogrouter.md | 6 +++--- server/modules/routing/binlogrouter/blr_slave.cc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/Routers/Binlogrouter.md b/Documentation/Routers/Binlogrouter.md index 625f1ae67..6e71c159c 100644 --- a/Documentation/Routers/Binlogrouter.md +++ b/Documentation/Routers/Binlogrouter.md @@ -397,7 +397,7 @@ MariaDB> CHANGE MASTER TO After the setup of the default master, secondary masters can be configured as follows: ``` -MariaDB> CHANGE MASTER ":2" TO +MariaDB> CHANGE MASTER ':2' TO MASTER_HOST='192.168.10.6', MASTER_PORT=3306, MASTER_USER='repl', @@ -412,13 +412,13 @@ All settings that are not explicitly specified are copied from the default master. That is, the following is equivalent with the command above: ``` -MariaDB> CHANGE MASTER ":2" TO MASTER_HOST='192.168.10.6'; +MariaDB> CHANGE MASTER ':2' TO MASTER_HOST='192.168.10.6'; ``` If a particular master configuration exists already, then any specified definitions will be changed and unspecified ones will remain unchanged. For instance, the following command would only change the password of `:2`. ``` -MariaDB> CHANGE MASTER ":2" TO MASTER_PASSWORD='repl2'; +MariaDB> CHANGE MASTER ':2' TO MASTER_PASSWORD='repl2'; ``` It is not possible to delete a particular secondary master, but if `MASTER_HOST` is set on the default master, even if it is set to the same diff --git a/server/modules/routing/binlogrouter/blr_slave.cc b/server/modules/routing/binlogrouter/blr_slave.cc index 369d5fcd6..82eea9513 100644 --- a/server/modules/routing/binlogrouter/blr_slave.cc +++ b/server/modules/routing/binlogrouter/blr_slave.cc @@ -4542,6 +4542,7 @@ int blr_handle_change_master(ROUTER_INSTANCE* router, if (index != 0) { + // Index 0 refers to the default configuration. string use_gtid = router->configs[0].use_mariadb10_gtid; if (use_gtid.empty() || (strcasecmp(use_gtid.c_str(), "slave_pos") != 0))