Snippet
Yeah, kitt finished writing this at 23:17 on 16 January 2010
For MySQL > 5.0.12, execution of a series of queries can be delayed / paused by using SELECT SLEEP(), which is useful when a previous query needs to be paused, say, when a slave is reconnecting to a master.
-- delay a query by one secondSELECTSLEEP(1);-- delay a series of queries by a 30 secondsSELECTSLEEP(30);-- stop the slave, skip the error SQL, start the slave, pause a second, then check the slave status
STOP SLAVE;SETGLOBAL SQL_SLAVE_SKIP_COUNTER =1;START SLAVE;SELECTSLEEP(1);SHOW SLAVE STATUS;