문제

Example I have an event that will run every 5 seconds, then the first instance of the event is triggered but more than 5 seconds later the instances still not done executing. What will happen to the event would it execute again after 5 seconds even the first event is not finished yet or it will wait for the first instance of the event to finish before executing?

Thanks

도움이 되었습니까?

해결책

To quote the manual:

If a repeating event does not terminate within its scheduling interval, the result may be multiple instances of the event executing simultaneously. If this is undesirable, you should institute a mechanism to prevent simultaneous instances. For example, you could use the GET_LOCK() function, or row or table locking.

In other words, the new copy will run.

This could lead to more and more running, so you should worry about it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top