List:Commits« Previous MessageNext Message »
From:msvensson Date:May 23 2006 8:21am
Subject:bk commit into 5.0 tree (msvensson:1.2137) 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.2137 06/05/23 10:20:57 msvensson@neptunus.(none) +1 -0
  Bug#19938  Valgrind error (race) in handle_slave_sql()
   - Unlock the mutex after looking at rli->events_till_abort
   - Already fixed in 5.1 so it will be null merged.

  sql/slave.cc
    1.266 06/05/23 10:20:49 msvensson@neptunus.(none) +11 -2
    Unlock the mutex after looking at rli->events_till_abort

# 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.265/sql/slave.cc	2006-02-17 07:51:10 +01:00
+++ 1.266/sql/slave.cc	2006-05-23 10:20:49 +02:00
@@ -3950,11 +3950,20 @@
   pthread_mutex_unlock(&LOCK_thread_count);
   pthread_cond_broadcast(&rli->stop_cond);
   // 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)
+  {
+    /*
+      Bug #19938 Valgrind error (race) in handle_slave_sql()
+      Read the value of rli->event_till_abort before releasing the mutex
+    */
+    pthread_mutex_unlock(&rli->run_lock);
     goto slave_begin;
-#endif  
+  }
+#endif
+  pthread_mutex_unlock(&rli->run_lock);
+
   my_thread_end();
   pthread_exit(0);
   DBUG_RETURN(0);				// Can't return anything here
Thread
bk commit into 5.0 tree (msvensson:1.2137) BUG#19938msvensson23 May