Bug #985 Between RESET SLAVE and START SLAVE, SHOW SLAVE STATUS is wrong
Submitted: 3 Aug 2003 13:35 Modified: 4 Aug 2003 2:13
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:4.0 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[3 Aug 2003 13:35] Guilhem Bichot
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.
[4 Aug 2003 2:13] Guilhem Bichot
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

ChangeSet@1.1560, 2003-08-04 10:59:44+02:00, guilhem@mysql.com
[17 Dec 2009 22:04] Roel Van de Paar
See bug #49785