MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:konstantin Date:April 20 2008 7:19am
Subject:bk commit into 6.0 tree (kostja:1.2629) BUG#32771
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of kostja.  When kostja 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, 2008-04-20 11:18:52+04:00, kostja@bodhi.(none) +2 -0
  A fix for Bug#32771 "events_bugs.test fails randomly".
  In Event_scheduler::stop(), which may be called from destructor,
  wait synchronously for the parallel Event_scheduler::stop() to
  complete before returning. This fixes a race between
  MySQL shutdown thread and the scheduler thread who could call
  stop() in parallel. 

  mysql-test/t/disabled.def@stripped, 2008-04-20 11:18:50+04:00, kostja@bodhi.(none) +0 -1
    Enabling the previously disabled test.

  sql/event_scheduler.cc@stripped, 2008-04-20 11:18:50+04:00, kostja@bodhi.(none) +5 -0
    A fix for Bug#32771 "events_bugs.test fails randomly".
    There was a race condition between the shutdown thread and
    the scheduler thread: the shutdown thread could delete the scheduler
    mutex before the sheduler has stopped.

diff -Nrup a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
--- a/mysql-test/t/disabled.def	2008-04-16 11:53:12 +04:00
+++ b/mysql-test/t/disabled.def	2008-04-20 11:18:50 +04:00
@@ -16,7 +16,6 @@ federated_transactions   : Bug#29523 Tra
 subselect2 : BUG#31464 SergeyP will fix
 show_check      : Bug #32682    Test show_check fails in 6.0
 lowercase_table3         : Bug#32667 lowercase_table3.test reports to error log
-events_bugs          : Bug#32771 events_bugs.test fails randomly
 rpl_log_pos          : Bug#8693 Test 'rpl_log_pos' fails sometimes
 subselect_sj         : Bug#32994: subselect_sj fails sporadically (timeout)
 ctype_create         : Bug#32965 main.ctype_create fails
diff -Nrup a/sql/event_scheduler.cc b/sql/event_scheduler.cc
--- a/sql/event_scheduler.cc	2007-11-14 19:29:58 +03:00
+++ b/sql/event_scheduler.cc	2008-04-20 11:18:50 +04:00
@@ -616,7 +616,12 @@ Event_scheduler::stop()
   LOCK_DATA();
   DBUG_PRINT("info", ("state before action %s", scheduler_states_names[state].str));
   if (state != RUNNING)
+  {
+    /* Synchronously wait until the scheduler stops. */
+    while (state != INITIALIZED)
+      COND_STATE_WAIT(thd, NULL, "Waiting for the scheduler to stop");
     goto end;
+  }
 
   /* Guarantee we don't catch spurious signals */
   do {
Thread
bk commit into 6.0 tree (kostja:1.2629) BUG#32771konstantin20 Apr