List:Commits« Previous MessageNext Message »
From:damien Date:October 19 2007 10:49pm
Subject:bk commit into 5.2 tree (dkatz:1.2638) BUG#31332
View as plain text  
Below is the list of changes that have just been committed into a local
5.2 repository of dkatz. When dkatz does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-19 16:49:02-04:00, dkatz@stripped +4 -0
  Bug #31332	--event-scheduler option misbehaving
  
  Changed the behaviour of the --event-scheduler option when used without an arguments. It now turns the option on.

  mysql-test/r/events_bugs.result@stripped, 2007-10-19 16:48:56-04:00, dkatz@stripped +4 -0
    Test that --event-scheduler with no options in events_bugs-master.opt turns the option on.

  mysql-test/t/events_bugs-master.opt@stripped, 2007-10-19 16:48:57-04:00, dkatz@stripped +1 -0
    Test that --event-scheduler with no options in events_bugs-master.opt turns the option on.

  mysql-test/t/events_bugs-master.opt@stripped, 2007-10-19 16:48:56-04:00, dkatz@stripped +0 -0

  mysql-test/t/events_bugs.test@stripped, 2007-10-19 16:48:56-04:00, dkatz@stripped +15 -0
    Test that --event-scheduler with no options in events_bugs-master.opt turns the option on.

  sql/events.cc@stripped, 2007-10-19 16:48:56-04:00, dkatz@stripped +1 -1
    Changed the behaviour of the --event-scheduler option when used without an arguments. It now turns the option on.

diff -Nrup a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result
--- a/mysql-test/r/events_bugs.result	2007-09-14 05:03:19 -04:00
+++ b/mysql-test/r/events_bugs.result	2007-10-19 16:48:56 -04:00
@@ -3,6 +3,10 @@ drop database if exists mysqltest_db1;
 drop database if exists mysqltest_db2;
 create database events_test;
 use events_test;
+select * from information_schema.global_variables where variable_name like 'event_scheduler';
+VARIABLE_NAME	VARIABLE_VALUE
+EVENT_SCHEDULER	ON
+SET GLOBAL event_scheduler = 'OFF';
 CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
 CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
 ERROR HY000: Event 'Lower_case' already exists
diff -Nrup a/mysql-test/t/events_bugs-master.opt b/mysql-test/t/events_bugs-master.opt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/t/events_bugs-master.opt	2007-10-19 16:48:57 -04:00
@@ -0,0 +1 @@
+--event-scheduler
diff -Nrup a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
--- a/mysql-test/t/events_bugs.test	2007-07-25 03:43:47 -04:00
+++ b/mysql-test/t/events_bugs.test	2007-10-19 16:48:56 -04:00
@@ -10,6 +10,21 @@ create database events_test;
 use events_test;
 
 #
+# START:  Bug #31332 --event-scheduler option misbehaving
+#
+
+# NOTE!! this test must come first! It's testing that the --event-scheduler
+# option with no argument in events_bugs-master.opt turns the scheduler on.
+
+select * from information_schema.global_variables where variable_name like 'event_scheduler';
+
+SET GLOBAL event_scheduler = 'OFF';
+
+#
+# END: Bug #31332
+#
+
+#
 # START - 16415: Events: event names are case sensitive
 #
 CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
diff -Nrup a/sql/events.cc b/sql/events.cc
--- a/sql/events.cc	2007-08-15 11:08:40 -04:00
+++ b/sql/events.cc	2007-10-19 16:48:56 -04:00
@@ -146,7 +146,7 @@ bool
 Events::set_opt_event_scheduler(char *argument)
 {
   if (argument == NULL)
-    opt_event_scheduler= Events::EVENTS_DISABLED;
+    opt_event_scheduler= Events::EVENTS_ON;
   else
   {
     int type;
Thread
bk commit into 5.2 tree (dkatz:1.2638) BUG#31332damien19 Oct