Bug #31264 CHANGE MASTER documentation are confusing or contraditory
Submitted: 27 Sep 2007 23:18 Modified: 9 Jul 2008 10:56
Reporter: Mark Callaghan Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:5.0 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any
Tags: change, documentation, master

[27 Sep 2007 23:18] Mark Callaghan
From: http://dev.mysql.com/doc/refman/5.0/en/change-master-to.html
The first paragraph implies (to me) that the SQL thread status is not reset when RELAY_LOG_FILE and RELAY_LOG_POS are not set. The second paragraph implies that they are reset in that case. Which is it?


MASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the slave I/O thread should begin reading from the master the next time the thread starts. If you specify either of them, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS. If neither of MASTER_LOG_FILE or MASTER_LOG_POS are specified, the slave uses the last coordinates of the slave SQL thread before CHANGE MASTER was issued. This ensures that there is no discontinuity in replication, even if the slave SQL thread was late compared to the slave I/O thread, when you merely want to change, say, the password to use.

CHANGE MASTER deletes all relay log files and starts a new one, unless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay logs are kept; the relay_log_purge global variable is set silently to 0. 

How to repeat:

Suggested fix:
[4 Jul 2008 14:31] Jon Stephens
Reassigned to myself at MC's request.
[9 Jul 2008 10:56] Jon Stephens
Since you can't issue CHANGE MASTER without stopping the slave SQL thread, its state (stopped) remains unchanged.