Description:
The behavior of RESET SLAVE is odd. It removes relay log files, relay-log.info and master.info. It creates an empty relay log file and the edits HOST-relay-bin.index to only list the new relay log file. After this is run, SHOW SLAVE STATUS returns a result as if the server were configured to be a slave.
Why does this create an empty relay log file? The server is no longer configured to be a slave, the file is useless. Its presence may mislead a DBA to think that the server is a slave.
Why does SHOW SLAVE STATUS return a result after RESET SLAVE is run? The server is not a slave. If the server is rebooted after RESET SLAVE, SHOW SLAVE STATUS returns nothing as expected for something not setup to be a slave.
And please, don't suggest CHANGE MASTER MASTER_HOST="" as the best way to do this. CHANGE MASTER is already overloaded way too much and this particular behavior for CHANGE MASTER is not documented.
How to repeat:
CHANGE MASTER ... (to setup a slave)
RESET SLAVE;
SHOW SLAVE STATUS;
Suggested fix:
Don't create an empty relay log file during RESET SLAVE.
Don't reference this file from HOST-relay-bin.index during RESET SLAVE.
Make SHOW SLAVE STATUS return nothing after RESET SLAVE.