Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.4Mb
PDF (A4) - 35.6Mb
PDF (RPM) - 33.8Mb
EPUB - 8.5Mb
HTML Download (TGZ) - 8.3Mb
HTML Download (Zip) - 8.4Mb
HTML Download (RPM) - 7.2Mb
Eclipse Doc Plugin (TGZ) - 9.2Mb
Eclipse Doc Plugin (Zip) - 11.3Mb
Man Pages (TGZ) - 198.4Kb
Man Pages (Zip) - 302.4Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
Excerpts from this Manual MASTER_POS_WAIT() Syntax

SELECT MASTER_POS_WAIT('master_log_file', master_log_pos [, timeout][, channel])

This is actually a function, not a statement. It is used to ensure that the slave has read and executed events up to a given position in the master's binary log. See Section 13.19, “Miscellaneous Functions”, for a full description.

User Comments
  Posted by Nathan Tanner on August 9, 2003
NOTE: If you have a cyclical replication setup (ie. more then two servers in a replication chain) do *NOT* rely on 'SHOW MASTER STATUS' on the slave's MASTER for values to use in the master_pos_wait function. This is because if the slave had just finished executing a binlog event that didn't originally come from its own MASTER, the master_log_pos value to be used in this function won't work. I feel this is a bug, but it is apparently designed to work this way. Don't ask me why.
  Posted by Jeff C on December 9, 2005
WARNING: does not block if slave errors.

If show slave status is reporting an error, function returns instantly.

Sign Up Login You must be logged in to post a comment.