List:Commits« Previous MessageNext Message »
From:msvensson Date:May 23 2006 4:20pm
Subject:bk commit into 5.0 tree (msvensson:1.2142) BUG#19938
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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
  1.2142 06/05/23 16:20:03 msvensson@neptunus.(none) +1 -0
  Bug #19938  	Valgrind error (race) in handle_slave_sql()

  sql/slave.cc
    1.268 06/05/23 16:19:59 msvensson@neptunus.(none) +8 -1
    Read rli->events_till_abort to a temporary variable before unlocking the mutex

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0

--- 1.267/sql/slave.cc	2006-05-23 16:14:44 +02:00
+++ 1.268/sql/slave.cc	2006-05-23 16:19:59 +02:00
@@ -3949,10 +3949,17 @@
   delete thd;
   pthread_mutex_unlock(&LOCK_thread_count);
   pthread_cond_broadcast(&rli->stop_cond);
+
+  /*
+    Bug #19938 Valgrind error (race) in handle_slave_sql()
+    Read the value of rli->event_till_abort before releasing the mutex
+  */
+  const int eta= rli->events_till_abort;
+
   // tell the world we are done
   pthread_mutex_unlock(&rli->run_lock);
 #ifndef DBUG_OFF // TODO: reconsider the code below
-  if (abort_slave_event_count && !rli->events_till_abort)
+  if (abort_slave_event_count && !eta)
     goto slave_begin;
 #endif  
   my_thread_end();
Thread
bk commit into 5.0 tree (msvensson:1.2142) BUG#19938msvensson23 May