List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:October 16 2008 9:45pm
Subject:bzr commit into mysql-5.1 branch (Matthias.Leich:2672) Bug#39569 Bug#39848
Bug#39863 Bug#39978
View as plain text  
#At file:///work2/5.1/mysql-5.1-bugteam-work/

 2672 Matthias Leich	2008-10-16
      - Fix for Bug #39848, #39863, #39978, #39569
        Bug#39848 events_bugs fails sporadically on pushbuild
                  (missing rows in table event_log)
           Details: Reimplement the subtest for BUG 28924
                    - check if the number of rows within the table
                      event_log changes but don't print rows
                      because the number varies depending on
                      load on testing box
                    - shift DROP USER befor DROP EVENT
                      = Subtest fits again to old bug
                    - remove no more needed comments + variables
        Bug#39863 events_bugs fails sporadically on pushbuild (extra processes
                  in I_S.PROCESSLIST)
           Details: Abort with appropriate message to the protocol if
                    release_lock() does not has the intended effect. 
                    This cannot prevent problems caused by the probably
                    buggy release_lock() but it reveals if we had a problem
                    in this area.
        Bug#39978 main.events_bugs does not clean up
           Detail: Restore global.event_scheduler = ON at end of test
        Bug#39569 events_bugs fails sporadically on pushbuild (should have
                  failed with errno 1539)
           Detail: Set $wait_timeout to 4 instead of 2
      - Minor improvements of formatting
           Details:
           - Add comments
           - Remove tabs and trailing blanks
           - Add line breaks for better readability
modified:
  mysql-test/r/events_bugs.result
  mysql-test/t/events_bugs.test

=== modified file 'mysql-test/r/events_bugs.result'
--- a/mysql-test/r/events_bugs.result	2008-02-07 10:47:39 +0000
+++ b/mysql-test/r/events_bugs.result	2008-10-16 19:45:38 +0000
@@ -59,7 +59,9 @@ begin
 select get_lock('test_bug16407', 60);
 end|
 "Now if everything is fine the event has compiled and is locked"
-select /*1*/ user, host, db, info from information_schema.processlist where
command!='Daemon' and (info is null or info not like '%processlist%') order by info;
+select /*1*/ user, host, db, info from information_schema.processlist
+where command!='Daemon' and (info is null or info not like '%processlist%')
+order by info;
 user	host	db	info
 root	localhost	events_test	select get_lock('test_bug16407', 60)
 select release_lock('test_bug16407');
@@ -114,7 +116,9 @@ event_schema	event_name	sql_mode
 events_test	ee_16407_2	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
 events_test	ee_16407_3	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
 events_test	ee_16407_4	
-select /*2*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*2*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 user	host	db	info
 event_scheduler	localhost	NULL	NULL
 root	localhost	events_test	select get_lock('ee_16407_2', 60)
@@ -123,7 +127,9 @@ root	localhost	events_test	select get_lo
 select release_lock('ee_16407_2');
 release_lock('ee_16407_2')
 1
-select /*3*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*3*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 user	host	db	info
 event_scheduler	localhost	NULL	NULL
 set global event_scheduler= off;
@@ -164,7 +170,9 @@ select release_lock('ee_16407_5');
 call events_test.ee_16407_6_pendant();
 end|
 "Should have 2 locked processes"
-select /*4*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*4*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 user	host	db	info
 event_scheduler	localhost	NULL	NULL
 root	localhost	events_test	select get_lock('ee_16407_5', 60)
@@ -173,7 +181,9 @@ select release_lock('ee_16407_5');
 release_lock('ee_16407_5')
 1
 "Should have 0 processes locked"
-select /*5*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*5*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 user	host	db	info
 event_scheduler	localhost	NULL	NULL
 select * from events_smode_test order by ev_name, a;
@@ -566,10 +576,9 @@ SHOW GRANTS FOR CURRENT_USER;
 Grants for root@localhost
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
 SET GLOBAL event_scheduler = ON;
-CREATE TABLE event_log (id int KEY AUTO_INCREMENT,
-ev_nm char(40), ev_cnt int,
-ev_tm timestamp) ENGINE=MyISAM;
-SET @ev_base_date = 20281224180000;
+CREATE TABLE events_test.event_log
+(id int KEY AUTO_INCREMENT, ev_nm char(40), ev_cnt int, ev_tm timestamp)
+ENGINE=MyISAM;
 SET autocommit=0;
 CREATE USER evtest1@localhost;
 SET PASSWORD FOR evtest1@localhost = password('ev1');
@@ -582,41 +591,40 @@ GRANT USAGE ON *.* TO 'evtest1'@'localho
 GRANT SELECT, INSERT ON `test`.* TO 'evtest1'@'localhost'
 GRANT SELECT, INSERT, CREATE, EVENT ON `events_test`.* TO 'evtest1'@'localhost'
 connection e1;
-USE events_test;
 CREATE EVENT ev_sched_1823 ON SCHEDULE EVERY 2 SECOND
 DO BEGIN
 SET AUTOCOMMIT = 0;
 SET @evname = 'ev_sched_1823';
 SET @cnt = 0;
-SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
+SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname;
 IF @cnt < 6 THEN
-INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
+INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
 COMMIT;
 END IF;
-SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
+SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname;
 IF @cnt < 6 THEN
-INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
+INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
 ROLLBACK;
 END IF;
 END;|
+Sleep till the first INSERT into events_test.event_log occured
+SELECT COUNT(*) > 0 AS "Expect 1" FROM events_test.event_log;
+Expect 1
+1
 connection default;
-DROP EVENT ev_sched_1823;
 DROP USER evtest1@localhost;
-USE test;
-=====================================================================================
-select id,ev_nm,ev_cnt from event_log order by id;
-id	ev_nm	ev_cnt
-1	ev_sched_1823	1
-2	ev_sched_1823	2
-3	ev_sched_1823	3
-4	ev_sched_1823	4
-5	ev_sched_1823	5
-6	ev_sched_1823	6
-DROP TABLE event_log;
+Sleep 4 seconds
+SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log;
+Sleep 4 seconds
+SELECT COUNT(*) > @row_cnt AS "Expect 0" FROM events_test.event_log;
+Expect 0
+0
+DROP EVENT events_test.ev_sched_1823;
+DROP TABLE events_test.event_log;
 SET GLOBAL event_scheduler = OFF;
 SET GLOBAL event_scheduler= ON;
 CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00'
-            DO BEGIN
+DO BEGIN
 SELECT 1;
 END;|
 SET GLOBAL event_scheduler= OFF;
@@ -736,3 +744,4 @@ select name from mysql.event where name
 name
 drop event e1;
 DROP DATABASE events_test;
+SET GLOBAL event_scheduler = 'ON';

=== modified file 'mysql-test/t/events_bugs.test'
--- a/mysql-test/t/events_bugs.test	2008-02-07 10:47:39 +0000
+++ b/mysql-test/t/events_bugs.test	2008-10-16 19:45:38 +0000
@@ -1,3 +1,42 @@
+#### t/events_bugs.test
+#
+# Last change:
+# 2008-10-16 mleich
+#     - Fix for
+#       Bug#39848 events_bugs fails sporadically on pushbuild
+#              (missing rows in table event_log)
+#       Bug#39863 events_bugs fails sporadically on pushbuild (extra processes
+#                 in I_S.PROCESSLIST)
+#       Bug#39978 main.events_bugs does not clean up
+#       Bug#39569 events_bugs fails sporadically on pushbuild (should have
+#                 failed with errno 1539)
+#     - Minor improvements of formatting
+#
+#
+# Outcome of some experiments (mleich):
+# 1. SET GLOBAL event_scheduler = 'ON';
+#    Immediate observation of the processlist.
+#    Effects:
+#    1. There is no guarantee to find immediate the user 'event_scheduler'
+#       within information_schema.processlist.
+#    2. Some states of the user 'event_scheduler' found in PROCESSLIST:
+#       USER            HOST       DB   COMMAND TIME STATE                  INFO
+#       event_scheduler localhost  NULL Daemon  0    Waiting on empty queue NULL
+#       event_scheduler localhost  NULL Daemon  0    Initialized            NULL
+# 2. SET GLOBAL event_scheduler = 'OFF';
+#    Immediate observation of the processlist.
+#    Effects:
+#    1. I never found the user 'event_scheduler' within the processlist.
+#    2. Events just during execution could be found within the processlist
+#       = It does not look like "SET GLOBAL event_scheduler = 'OFF'" stops them.
+# 3. An event gets executed
+#    USER evtest1     (Definer of event)
+#    DB   events_test (DB during time of event creation)
+#    COMMAND Connect
+#    STATE   NULL
+#    INFO    SET @evname = 'ev_sched_1823' (Part of the event code)
+#
+
 # Can't test with embedded server that doesn't support grants
 -- source include/not_embedded.inc
 
@@ -105,14 +144,40 @@ begin
 end|
 delimiter ;|
 
+# The default session has the user lock.
+# We wait till the event runs and hangs when trying to get the user lock.
 let $wait_condition=
   select count(*) = 1 from information_schema.processlist
   where info = 'select get_lock(\'test_bug16407\', 60)';
 --source include/wait_condition.inc
 
 --echo "Now if everything is fine the event has compiled and is locked"
-select /*1*/ user, host, db, info from information_schema.processlist where
command!='Daemon' and (info is null or info not like '%processlist%') order by info;
+# Expect to see one session in events_test waiting for the user lock.
+select /*1*/ user, host, db, info from information_schema.processlist
+where command!='Daemon' and (info is null or info not like '%processlist%')
+order by info;
 select release_lock('test_bug16407');
+# Try to avoid
+#    Bug#39863 events_bugs fails sporadically on pushbuild (extra processes in
I_S.PROCESSLIST)
+# which is most probably caused by
+#    Bug#32782 User lock hash fails to find lock
+#    "various issues related to missing or incorrect return results
+#     from release_lock()."
+# Therefore we check here if the session of the event executor disappeared or
+# we waited >= 5 seconds for this to happen.
+let $wait_timeout= 5;
+let $wait_condition=
+  select count(*) = 0 from information_schema.processlist
+  where info = 'select get_lock(\'test_bug16407\', 60)';
+--source include/wait_condition.inc
+if (!`$wait_condition`)
+{
+   --echo ERROR: There must be no session with info = 'select get_lock('test_bug16407',
60) within the processlist.
+   --echo        We probably hit Bug#32782 User lock hash fails to find lock
+   eval select * from information_schema.processlist;
+   --echo Abort
+   exit;
+}
 
 set global event_scheduler= off;
 
@@ -164,7 +229,9 @@ let $wait_condition=
   where info = 'select get_lock(\'ee_16407_2\', 60)';
 --source include/wait_condition.inc
 
-select /*2*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*2*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 select release_lock('ee_16407_2');
 
 let $wait_condition=
@@ -174,7 +241,9 @@ let $wait_condition=
   and (info is null or info not like '%processlist%');
 --source include/wait_condition.inc
 
-select /*3*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*3*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 set global event_scheduler= off;
 select * from events_smode_test order by ev_name, a;
 --echo "OK, last check before we drop them"
@@ -216,7 +285,9 @@ let $wait_condition=
 --source include/wait_condition.inc
 
 --echo "Should have 2 locked processes"
-select /*4*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*4*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 select release_lock('ee_16407_5');
 
 let $wait_condition=
@@ -227,7 +298,9 @@ let $wait_condition=
 --source include/wait_condition.inc
 
 --echo "Should have 0 processes locked"
-select /*5*/ user, host, db, info from information_schema.processlist where
(command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%') order by info;
+select /*5*/ user, host, db, info from information_schema.processlist
+where (command!='Daemon' || user='event_scheduler') and (info is null or info not like
'%processlist%')
+order by info;
 select * from events_smode_test order by ev_name, a;
 --echo "And here we check one more time before we drop the events"
 select event_schema, event_name, sql_mode from information_schema.events order by
event_schema, event_name;
@@ -239,7 +312,7 @@ set global event_scheduler= off;
 drop table events_smode_test;
 set sql_mode=@old_sql_mode;
 #
-# End  - 16407: Events: Changes in sql_mode won't be taken into account  
+# End  - 16407: Events: Changes in sql_mode won't be taken into account
 #
 
 #
@@ -401,39 +474,39 @@ CREATE USER mysqltest_u1@localhost;
 GRANT EVENT ON events_test.* TO mysqltest_u1@localhost;
 
 CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 ALTER DEFINER=mysqltest_u1@localhost EVENT e1 ON SCHEDULE EVERY 1 HOUR;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 CREATE DEFINER=mysqltest_u1@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO
   SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 connect (conn1, localhost, mysqltest_u1, , events_test);
 
 CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY 1 HOUR;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; 
+SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
 DROP EVENT e1;
 
 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
@@ -664,21 +737,18 @@ CREATE EVENT new_event ON SCHEDULE AT NO
 CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1;
 
 #
-# START - BUG#28924 If I drop the user who is the definer of an active event then server
cores
+# START - BUG#28924 If I drop the user who is the definer of an active event
+#                   then server cores
 #
 let $engine=MyISAM;
 USE test;
 SHOW GRANTS FOR CURRENT_USER;
 SET GLOBAL event_scheduler = ON;
-eval CREATE TABLE event_log (id int KEY AUTO_INCREMENT,
-                             ev_nm char(40), ev_cnt int,
-                             ev_tm timestamp) ENGINE=$engine; 
-SET @ev_base_date = 20281224180000;
---disable_warnings
+eval
+CREATE TABLE events_test.event_log
+(id int KEY AUTO_INCREMENT, ev_nm char(40), ev_cnt int, ev_tm timestamp)
+ENGINE=$engine;
 SET autocommit=0;
-#DROP DATABASE IF EXISTS ev_db_1;
-#CREATE DATABASE ev_db_1;
---enable_warnings
 CREATE USER evtest1@localhost;
 SET PASSWORD FOR evtest1@localhost = password('ev1');
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM evtest1@localhost;
@@ -689,53 +759,70 @@ SHOW GRANTS FOR evtest1@localhost;
 --echo connection e1;
 --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 connect (e1,localhost,evtest1,ev1,events_test,$MASTER_MYPORT,$MASTER_MYSOCK);
-USE events_test;
-
 DELIMITER |;
 CREATE EVENT ev_sched_1823 ON SCHEDULE EVERY 2 SECOND
 DO BEGIN
-       SET AUTOCOMMIT = 0;
-       SET @evname = 'ev_sched_1823';
-       SET @cnt = 0;
-       SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
-       IF @cnt < 6 THEN
-         INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
-         COMMIT;
-       END IF;
-       SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
-       IF @cnt < 6 THEN
-         INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
-         ROLLBACK;
-       END IF;
+   SET AUTOCOMMIT = 0;
+   SET @evname = 'ev_sched_1823';
+   SET @cnt = 0;
+   SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname;
+   IF @cnt < 6 THEN
+      INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
+      COMMIT;
+   END IF;
+   SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname;
+   IF @cnt < 6 THEN
+      INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
+      ROLLBACK;
+   END IF;
 END;|
 DELIMITER ;|
-
---sleep 6
+# 1. Show that the new created event is runnable and gets executed within a
+#    reasonable time like 4 seconds. Till ~ 2 seconds could pass on a heavy
+#    loaded testing box before something gets executed).
+#    Detection of execution is via the records inserted by the event.
+--echo Sleep till the first INSERT into events_test.event_log occured
+let $wait_timeout= 4;
+let $wait_condition=
+SELECT COUNT(*) > 0 FROM events_test.event_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 AS "Expect 1" FROM events_test.event_log;
+#
 --echo connection default;
-DROP EVENT ev_sched_1823;
 connection default;
 DROP USER evtest1@localhost;
-
---sleep 6
-USE test;
---echo
=====================================================================================
---sleep 5
-#--disable_result_log
-select id,ev_nm,ev_cnt from event_log order by id;
-#--enable_result_log
-DROP TABLE event_log;
-#DROP DATABASE ev_db_1;
+# 2. If we meet BUG#28924 again than a server crash happens within the next
+#    few seconds
+# 3. Check that the event is never executed again
+#    It could be that an event execution was running before the DROP USER
+#    and all implicite actions belonging to this are completed.
+#    Lets assume that ~ 4 seconds waiting are enough for the event
+#    scheduler to detect that
+--echo Sleep 4 seconds
+sleep 4;
+SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log;
+#    Give the event mechanism ~ 4 seconds to do something wrong
+#    (execute the event of the dropped user -> inser rows).
+--echo Sleep 4 seconds
+sleep 4;
+SELECT COUNT(*) > @row_cnt AS "Expect 0" FROM events_test.event_log;
+#
+# Cleanup
+disconnect e1;
+DROP EVENT events_test.ev_sched_1823;
+DROP TABLE events_test.event_log;
 SET GLOBAL event_scheduler = OFF;
 
+
 #
 # Bug#28641 CREATE EVENT with '2038.01.18 03:00:00' let server crash.
 #
 SET GLOBAL event_scheduler= ON;
 DELIMITER |;
 CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00'
-            DO BEGIN
-		SELECT 1;
-               END;|
+DO BEGIN
+   SELECT 1;
+END;|
 
 DELIMITER ;|
 SET GLOBAL event_scheduler= OFF;
@@ -868,7 +955,7 @@ SET GLOBAL EVENT_SCHEDULER = ON;
 
 --echo # Waiting for the event scheduler to execute and drop event e1...
 
-let $wait_timeout = 2;
+let $wait_timeout = 4;
 let $wait_condition =
   SELECT COUNT(*) = 0
   FROM INFORMATION_SCHEMA.EVENTS
@@ -957,7 +1044,7 @@ select name from mysql.event where name
 drop event e1;
 
 ###########################################################################
-# 
+#
 # End of tests
 #
 # !!! KEEP this section AT THE END of this file !!!
@@ -970,5 +1057,8 @@ let $wait_condition=
 --source include/wait_condition.inc
 
 DROP DATABASE events_test;
+# Restore the original state (option with no argument in events_bugs-master.opt
+# turns the scheduler on).
+SET GLOBAL event_scheduler = 'ON';
 
 # THIS MUST BE THE LAST LINE in this file.

Thread
bzr commit into mysql-5.1 branch (Matthias.Leich:2672) Bug#39569 Bug#39848Bug#39863 Bug#39978Matthias Leich16 Oct