Description:
User comment in manual from T Macinta, http://dev.mysql.com/doc/mysql/en/show-slave-status.html:
»I think that a clarification of the 'Exec_Master_Log_Pos' field would be
helpful. The manual currently states that it is "the position in the
current master binary file up to which the SQL thread has read and
executed." It's not clear from this whether the position points to the
start of the command that was most recently executed or whether it points
to the position immediately following that command.
»The distinction can be of practical importance when using an existing slave
to set up a second slave for the first time. The "CHANGE MASTER TO"
statement on the new slave needs to be given the position for the start of
the first command to be executed. If the 'Exec_Master_Log_Pos' field
reported by "SHOW SLAVE STATUS" pointed at the start of the last statement
which was executed, then using that position for the "CHANGE MASTER TO"
statement would lead to that first statement being executed twice, which
could result in the slaves being inconsistent. In that case, "SHOW BINLOG
EVENTS ..." could be used on the master to find the position of the next
statement so that the new slave can start with it instead. However, I
don't think this is necessary.
»Based on my own experimentation, I believe that the 'Exec_Master_Log_Pos'
field points to the position immediately following the last statement which
was executed. That would mean that it could be used as is with the "CHANGE
MASTER TO" statement. It might be helpful to others if this was confirmed
and the manual's language updated to clarify the position of
'Exec_Master_Log_Pos' relative to the most recently executed statement,
assuming that my conclusion was correct.»
How to repeat:
See Description.
Suggested fix:
Verify user's observations with developers and that this represents the intended behaviour. Note same in documentation.