Commit c259b576 authored by unknown's avatar unknown
Browse files

Merge kpdesk.mysql.com:/home/thek/dev/bug26807/my51-bug26807

into  kpdesk.mysql.com:/home/thek/dev/mysql-5.1-runtime


sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
parents 44137aa3 2b2fb674
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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
+7 −0
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -3758,6 +3758,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
    udf_init();
#endif
  }

  init_status_vars();
  if (opt_bootstrap) /* If running with bootstrap, do not start replication. */
    opt_skip_slave_start= 1;
@@ -3804,6 +3805,10 @@ we force server id to 2, but this MySQL server will not act as a slave.");
    if (Events::get_instance()->init())
      unireg_abort(1);
  }
  else
  {
    Events::opt_event_scheduler = Events::EVENTS_DISABLED; 
  }

  /* Signal threads waiting for server to be started */
  pthread_mutex_lock(&LOCK_server_started);
+1 −1
Original line number Diff line number Diff line
@@ -4000,7 +4000,7 @@ sys_var_event_scheduler::update(THD *thd, set_var *var)
  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);
  }