List:Commits« Previous MessageNext Message »
From:kpettersson Date:March 16 2007 1:57pm
Subject:bk commit into 5.1 tree (thek:1.2443) BUG#26807
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of thek. When thek 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-03-16 14:57:02+01:00, thek@stripped +4 -0
  Bug#26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
  
  - Crash occured because Event engine is only initialized if
    ACLs are used but not properly marked as disabled.
  - The patch is to mark the Event engine as DISABLED if no ACLs
    are used to avoid access of uninitialized variables.

  mysql-test/r/skip_grants.result@stripped, 2007-03-16 14:56:59+01:00, thek@stripped +2 -0
    Added test case

  mysql-test/t/skip_grants.test@stripped, 2007-03-16 14:56:59+01:00, thek@stripped +7 -0
    Added test case

  sql/mysqld.cc@stripped, 2007-03-16 14:56:59+01:00, thek@stripped +5 -0
    Bug#26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
    
    - Crash occured because Event engine is only initialized if
      ACLs are used but not properly marked as disabled.
    - The patch is to mark the Event engine as DISABLED if no ACLs
      are used to avoid access of uninitialized variables.

  sql/set_var.cc@stripped, 2007-03-16 14:57:00+01:00, thek@stripped +1 -1
    Bug#26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
    
    - Crash occured because Event engine is only initialized if
      ACLs are used but not properly marked as disabled.
    - The patch is to mark the Event engine as DISABLED if no ACLs
      are used to avoid access of uninitialized variables.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	thek
# Host:	kpdesk.mysql.com
# Root:	/home/thek/dev/bug26807/my51-bug26807

--- 1.618/sql/mysqld.cc	2007-03-16 14:57:10 +01:00
+++ 1.619/sql/mysqld.cc	2007-03-16 14:57:10 +01:00
@@ -3691,6 +3691,7 @@ we force server id to 2, but this MySQL 
     udf_init();
 #endif
   }
+
   init_status_vars();
   if (opt_bootstrap) /* If running with bootstrap, do not start replication. */
     opt_skip_slave_start= 1;
@@ -3736,6 +3737,10 @@ we force server id to 2, but this MySQL 
   {
     if (Events::get_instance()->init())
       unireg_abort(1);
+  }
+  else
+  {
+    Events::opt_event_scheduler = Events::EVENTS_DISABLED; 
   }
 
   /* Signal threads waiting for server to be started */

--- 1.9/mysql-test/r/skip_grants.result	2007-03-16 14:57:10 +01:00
+++ 1.10/mysql-test/r/skip_grants.result	2007-03-16 14:57:10 +01:00
@@ -58,3 +58,5 @@ DROP PROCEDURE p3;
 DROP FUNCTION f1;
 DROP FUNCTION f2;
 DROP FUNCTION f3;
+set global event_scheduler=1;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED or --skip-grant-tables option so it cannot execute this statement

--- 1.11/mysql-test/t/skip_grants.test	2007-03-16 14:57:10 +01:00
+++ 1.12/mysql-test/t/skip_grants.test	2007-03-16 14:57:10 +01:00
@@ -108,3 +108,10 @@ DROP PROCEDURE p3;
 DROP FUNCTION f1;
 DROP FUNCTION f2;
 DROP FUNCTION f3;
+
+#
+# Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
+#
+--error ER_OPTION_PREVENTS_STATEMENT
+set global event_scheduler=1;
+

--- 1.216/sql/set_var.cc	2007-03-16 14:57:11 +01:00
+++ 1.217/sql/set_var.cc	2007-03-16 14:57:11 +01:00
@@ -3990,7 +3990,7 @@ sys_var_event_scheduler::update(THD *thd
   DBUG_ENTER("sys_var_event_scheduler::update");
   if (Events::opt_event_scheduler == Events::EVENTS_DISABLED)
   {
-    my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED");
+    my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables");
     DBUG_RETURN(TRUE);
   }
 
Thread
bk commit into 5.1 tree (thek:1.2443) BUG#26807kpettersson16 Mar