views:

394

answers:

1

Hi!

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);
+2  A: 

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.

Jonathan Campbell
Perfect! Thanks a lot.
Ragnar