Description:
When you do
RESET SLAVE;
this deletes master.info.
Then you do START SLAVE, this re-creates master.info using values from my.cnf
(master_host, master_user etc).
So 1st bug is a doc bug (the doc says that after RESET SLACE, the connection information
(host/user/password/port) is unchanged, whereas it's back to the options.
2nd bug is that after RESET SLAVE, before START SLAVE, SHOW SLAVE STATUS shows old
connection information (1st and 2nd bug are consistent which each other :), which is
going to be overwritten at START SLAVE.
In other words, it's a bad display of SHOW SLAVE STATUS which could confuse people (they
do SHOW SLAVE STATUS, they think the slave is going to connect to what they see on the
screen, and it does not when they START SLAVE...).
How to repeat:
Start slave's mysqld with no master.info file, with --master_host=127.0.0.1
and --master_user=root.
Then do:
SLAVE> change master to master_user='unknown2';
SLAVE> reset slave;
SLAVE> show slave status\G
*************************** 1. row ***************************
Master_Host: 127.0.0.1
Master_User: unknown2
<cut>
SLAVE> start slave;
SLAVE> show slave status\G
*************************** 1. row ***************************
Master_Host: 127.0.0.1
Master_User: root
See how SHOW SLAVE STATUS is wrong?
Suggested fix:
What should SHOW SLAVE STATUS display in that case? The values that are going to be used
at next START SLAVE, i.e. the ones from my.cnf.
Description: When you do RESET SLAVE; this deletes master.info. Then you do START SLAVE, this re-creates master.info using values from my.cnf (master_host, master_user etc). So 1st bug is a doc bug (the doc says that after RESET SLACE, the connection information (host/user/password/port) is unchanged, whereas it's back to the options. 2nd bug is that after RESET SLAVE, before START SLAVE, SHOW SLAVE STATUS shows old connection information (1st and 2nd bug are consistent which each other :), which is going to be overwritten at START SLAVE. In other words, it's a bad display of SHOW SLAVE STATUS which could confuse people (they do SHOW SLAVE STATUS, they think the slave is going to connect to what they see on the screen, and it does not when they START SLAVE...). How to repeat: Start slave's mysqld with no master.info file, with --master_host=127.0.0.1 and --master_user=root. Then do: SLAVE> change master to master_user='unknown2'; SLAVE> reset slave; SLAVE> show slave status\G *************************** 1. row *************************** Master_Host: 127.0.0.1 Master_User: unknown2 <cut> SLAVE> start slave; SLAVE> show slave status\G *************************** 1. row *************************** Master_Host: 127.0.0.1 Master_User: root See how SHOW SLAVE STATUS is wrong? Suggested fix: What should SHOW SLAVE STATUS display in that case? The values that are going to be used at next START SLAVE, i.e. the ones from my.cnf.