List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:May 7 2008 6:03pm
Subject:bk commit into 5.1 tree (davi:1.2614)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of davi.  When davi 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-05-07 15:03:16-03:00, davi@stripped +1 -0
  Fix for a sporadic crash of the server when displaying table locks.
  
  The problem is that a lock (mutex) could be destroyed before being
  removed from the list of locks in use, causing a race condition
  with other threads iterating over the the list. The solution is
  to destroy the mutex after removing it from the list.

  mysys/thr_lock.c@stripped, 2008-05-07 15:03:14-03:00, davi@stripped +1 -1
    Destroy the mutex after removing it from the list.

diff -Nrup a/mysys/thr_lock.c b/mysys/thr_lock.c
--- a/mysys/thr_lock.c	2008-02-18 19:36:53 -03:00
+++ b/mysys/thr_lock.c	2008-05-07 15:03:14 -03:00
@@ -333,10 +333,10 @@ void thr_lock_init(THR_LOCK *lock)
 void thr_lock_delete(THR_LOCK *lock)
 {
   DBUG_ENTER("thr_lock_delete");
-  VOID(pthread_mutex_destroy(&lock->mutex));
   pthread_mutex_lock(&THR_LOCK_lock);
   thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
   pthread_mutex_unlock(&THR_LOCK_lock);
+  VOID(pthread_mutex_destroy(&lock->mutex));
   DBUG_VOID_RETURN;
 }
 
Thread
bk commit into 5.1 tree (davi:1.2614)Davi Arnaut7 May
  • Re: bk commit into 5.1 tree (davi:1.2614)Dmitry Lenev7 May