sleep

Morning Furnace

Blog

It is a well-known, documented human physiological phenomenon that a person's body temperature will lower during sleep and rise before waking. Whether the body temperature rise is considered a trigger to wake or the result of another process is unclear.

It is a significantly-less well-known that my normal daytime body temperature isn't the usual 98.6°, but rather, is the confusing 96.8° Every once in a while (say, like, once a month, you make the connection), my normal temperature rises to 97.1°, but it generally hovers below 97°. Anyone who has touched my hands or other extremities can attest to this generally always cold(er than normal) temperature.

Pause a MySQL query with sleep

Snippet

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 second
SELECT SLEEP(1);
 
-- delay a series of queries by a 30 seconds
SELECT SLEEP(30);
 
-- stop the slave, skip the error SQL, start the slave, pause a second, then check the slave status
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE; SELECT SLEEP(1); SHOW SLAVE STATUS;