MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
running_event_scheduler.inc
1 ############# include/running_event_scheduler.inc ##########################
2 # #
3 # Wait till the event scheduler reached its final state within the processlist.#
4 # #
5 # The characteristics of the event_scheduler entry within the processlist is #
6 # user = 'event_scheduler' and command = 'Daemon'. I am not 100% sure if #
7 # ther is no short phase with command <> 'Daemon'. #
8 # A query with WHERE user = 'event_scheduler' only will also catch events in #
9 # startup phase. #
10 # #
11 # Creation: #
12 # 2008-12-19 mleich Implement this check needed for test bug fixes #
13 # #
14 ################################################################################
15 
16 # 1. Check that the server system variable shows the state needed
17 if (`SELECT @@global.event_scheduler <> 'ON'`)
18 {
19  --echo # Error: We expect here that the event scheduler is switched on.
20  SELECT @@global.event_scheduler;
21  --echo # Thinkable reasons:
22  --echo # 1. SET GLOBAL event_scheduler = ON had not the expected effect.
23  --echo # 2. Use of the current routine (include/running_event_scheduler.inc)
24  --echo # within the wrong situation
25  --die
26 }
27 let $wait_condition=
28  SELECT COUNT(*) = 1 FROM information_schema.processlist
29  WHERE user = 'event_scheduler' AND command = 'Daemon';
30 --source include/wait_condition.inc