MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Marc Alff Date:May 7 2009 3:46pm
Subject:bzr commit into mysql-6.0-perfschema branch (marc.alff:3136) Bug#44710
View as plain text  
#At file:///home/malff/BZR-TREE/mysql-6.0-perfschema/ based on revid:marc.alff@stripped

 3136 Marc Alff	2009-05-07
      Bug#44710 assertion failure in mdl when server starts, related to performance schema
      
      The assert was related to a build warning.
      
      THR_LOCK_mutex is pthread_mutex_t, not a mysql_mutex_t.
      Using thread_safe_increment caused the code to use a non existent m_psi pointer.
      
      Fixed another build warning (bytes may not be initialized).
modified:
  mysys/thr_mutex.c

=== modified file 'mysys/thr_mutex.c'
--- a/mysys/thr_mutex.c	2009-05-06 23:00:55 +0000
+++ b/mysys/thr_mutex.c	2009-05-07 15:46:42 +0000
@@ -157,7 +157,10 @@ int safe_mutex_init(safe_mutex_t *mp,
     pthread_mutex_unlock(&THR_LOCK_mutex);
   }
 #else
-  thread_safe_increment(safe_mutex_count, &THR_LOCK_mutex);
+  /* Can not use thread_safe_increment: THR_LOCK_mutex is not instrumented */
+  pthread_mutex_lock(&THR_LOCK_mutex);
+  safe_mutex_count++;
+  pthread_mutex_unlock(&THR_LOCK_mutex);
 #endif /* SAFE_MUTEX_DETECT_DESTROY */
   DBUG_RETURN(0);
 }
@@ -564,7 +567,10 @@ int safe_mutex_destroy(safe_mutex_t *mp,
     mp->info= NULL;				/* Get crash if double free */
   }
 #else
-  thread_safe_sub(safe_mutex_count, 1, &THR_LOCK_mutex);
+  /* Can not use thread_safe_decrement: THR_LOCK_mutex is not instrumented */
+  pthread_mutex_lock(&THR_LOCK_mutex);
+  safe_mutex_count--
+  pthread_mutex_unlock(&THR_LOCK_mutex);
 #endif /* SAFE_MUTEX_DETECT_DESTROY */
   DBUG_RETURN(error);
 }

Thread
bzr commit into mysql-6.0-perfschema branch (marc.alff:3136) Bug#44710Marc Alff7 May