List:Commits« Previous MessageNext Message »
From:Marc Alff Date:June 18 2012 9:33pm
Subject:bzr push into mysql-trunk branch (marc.alff:4008 to 4009)
View as plain text  
 4009 Marc Alff	2012-06-18
      Fixed windows build breaks, used wrapper APIs for pthread_rwlock

    modified:
      dbug/dbug.c
 4008 kevin.lewis@stripped	2012-06-18
      Attempt to fix several intermittent and platform specific PB2
      failures from the wl 5980 push.
      
      innodb-multiple-tablespaces;  This test causes a code path where
      InnoDB will not start up because there are two versions of a
      tablespace available during recovery.  This path should exit with
      exit(1) instead of ut_a() since MTR will stop the test if it finds
      a call stack on some platforms.
      
      This test had a very rare timing related error where a --remove-file 
      command in MTR did not work. This patch replaces --copy_file followed
      by --remove_file with just a single --move-file.
      
      innodb-wl5980-discard;  One failure on one platform  out of over a
      dozen runs involves a pre-existing entry in the InnoDB tablespace
      cache for 'test/t1' when a new 'test/t1' is being added.  In case
      this is  a conflict with another test run in parallel, the tablename
      is changed to 'test/t5980'.

    modified:
      mysql-test/suite/innodb/r/innodb-wl5980-discard.result
      mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test
      mysql-test/suite/innodb/t/innodb-wl5980-discard.test
      storage/innobase/fil/fil0fil.cc
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2012-06-15 16:35:44 +0000
+++ b/dbug/dbug.c	2012-06-18 21:32:59 +0000
@@ -361,7 +361,7 @@ static pthread_mutex_t THR_LOCK_dbug;
   For performance reasons,
   the member @c init_settings.flags is not protected.
 */
-static pthread_rwlock_t THR_LOCK_init_settings;
+static rw_lock_t THR_LOCK_init_settings;
 
 static CODE_STATE *code_state(void)
 {
@@ -378,7 +378,7 @@ static CODE_STATE *code_state(void)
   {
     init_done=TRUE;
     pthread_mutex_init(&THR_LOCK_dbug, NULL);
-    pthread_rwlock_init(&THR_LOCK_init_settings, NULL);
+    my_rwlock_init(&THR_LOCK_init_settings, NULL);
     memset(&init_settings, 0, sizeof(init_settings));
     init_settings.out_file=stderr;
     init_settings.flags=OPEN_APPEND;
@@ -412,7 +412,7 @@ static void read_lock_stack(CODE_STATE *
   if (cs->stack == &init_settings)
   {
     if (++(cs->m_read_lock_count) == 1)
-      pthread_rwlock_rdlock(&THR_LOCK_init_settings);
+      rw_rdlock(&THR_LOCK_init_settings);
   }
 }
 
@@ -425,7 +425,7 @@ static void unlock_stack(CODE_STATE *cs)
   if (cs->stack == &init_settings)
   {
     if (--(cs->m_read_lock_count) == 0)
-      pthread_rwlock_unlock(&THR_LOCK_init_settings);
+      rw_unlock(&THR_LOCK_init_settings);
   }
 }
 
@@ -516,7 +516,7 @@ int DbugParse(CODE_STATE *cs, const char
   */
   assert(cs->m_read_lock_count == 0);
   if (stack == &init_settings)
-    pthread_rwlock_wrlock(&THR_LOCK_init_settings);
+    rw_wrlock(&THR_LOCK_init_settings);
 
   if (control[0] == '-' && control[1] == '#')
     control+=2;
@@ -548,7 +548,7 @@ int DbugParse(CODE_STATE *cs, const char
     if (stack->next == &init_settings)
     {
       assert(stack != &init_settings);
-      pthread_rwlock_rdlock(&THR_LOCK_init_settings);
+      rw_rdlock(&THR_LOCK_init_settings);
 
       /*
         Never share with the global parent - it can change under your feet.
@@ -562,7 +562,7 @@ int DbugParse(CODE_STATE *cs, const char
       stack->keywords= ListCopy(init_settings.keywords);
       stack->processes= ListCopy(init_settings.processes);
 
-      pthread_rwlock_unlock(&THR_LOCK_init_settings);
+      rw_unlock(&THR_LOCK_init_settings);
     }
     else
     {
@@ -744,7 +744,7 @@ int DbugParse(CODE_STATE *cs, const char
   }
 
   if (stack == &init_settings)
-    pthread_rwlock_unlock(&THR_LOCK_init_settings);
+    rw_unlock(&THR_LOCK_init_settings);
 
   return !rel || f_used;
 }
@@ -1778,7 +1778,7 @@ void _db_end_()
     FreeState(cs, discard, 1);
   }
 
-  pthread_rwlock_wrlock(&THR_LOCK_init_settings);
+  rw_wrlock(&THR_LOCK_init_settings);
   tmp= init_settings;
   init_settings.flags=    OPEN_APPEND;
   init_settings.out_file= stderr;
@@ -1790,7 +1790,7 @@ void _db_end_()
   init_settings.p_functions= 0;
   init_settings.keywords= 0;
   init_settings.processes= 0;
-  pthread_rwlock_unlock(&THR_LOCK_init_settings);
+  rw_unlock(&THR_LOCK_init_settings);
   FreeState(cs, &tmp, 0);
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:4008 to 4009) Marc Alff19 Jun