MySQL trigger/procedure execution delay

mysql, stored-procedures, triggers

Solution

Since MySQL 5.0.12, you can do this:

SELECT SLEEP(<seconds>);

The seconds parameter can be in a fraction of a second like .5.

Problem

Is there a decent way to delay execution of mysql trigger? ``` WHILE @condition = 0 sleep for awhile insert into some_table values(NEW.value1, NEW.value2); ```

Original source