MXS-2011 Fix documentation and comments

Fix documentation and comment based upon review comments.
This commit is contained in:
Johan Wikman
2018-09-04 14:35:29 +03:00
parent 65d355c7d7
commit a0ea37b2c5
2 changed files with 4 additions and 3 deletions

View File

@ -397,7 +397,7 @@ MariaDB> CHANGE MASTER TO
After the setup of the default master, secondary masters can be configured After the setup of the default master, secondary masters can be configured
as follows: as follows:
``` ```
MariaDB> CHANGE MASTER ":2" TO MariaDB> CHANGE MASTER ':2' TO
MASTER_HOST='192.168.10.6', MASTER_HOST='192.168.10.6',
MASTER_PORT=3306, MASTER_PORT=3306,
MASTER_USER='repl', 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 default master. That is, the following is equivalent with the command
above: 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 If a particular master configuration exists already, then any specified
definitions will be changed and unspecified ones will remain unchanged. definitions will be changed and unspecified ones will remain unchanged.
For instance, the following command would only change the password of `:2`. 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 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 `MASTER_HOST` is set on the default master, even if it is set to the same

View File

@ -4542,6 +4542,7 @@ int blr_handle_change_master(ROUTER_INSTANCE* router,
if (index != 0) if (index != 0)
{ {
// Index 0 refers to the default configuration.
string use_gtid = router->configs[0].use_mariadb10_gtid; string use_gtid = router->configs[0].use_mariadb10_gtid;
if (use_gtid.empty() || (strcasecmp(use_gtid.c_str(), "slave_pos") != 0)) if (use_gtid.empty() || (strcasecmp(use_gtid.c_str(), "slave_pos") != 0))