Description
The MASTER_POS_WAIT( ) function is used to ensure whether the slave has read and executed events up to a given position in the master's binary log.
This function has the form:
SELECT LOCATE(master log file, master log pos)
Parameter | Description |
---|---|
master log file | Master log file |
master log pos | Master log position |
Return Value
Ensures whether the slave has read and executed events up to a given position in the master's binary log. If you give the timeout parameter and the amount of time is exceeded, then -1 is returned.
Examples
The following example shows the basic use of this function:
SELECT MASTER_POS_WAIT('dbmaster1-bin.000002', 4);
SLAVE STOP;