List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:March 28 2012 9:51am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4907 to 4908)
Bug#12319939
View as plain text  
 4908 Jonas Oreland	2012-03-28
      ndb - bug#12319939 - missed a few lock(injector_mutex)

    modified:
      sql/ha_ndbcluster_binlog.cc
 4907 Jonas Oreland	2012-03-27
      ndb - bug#12319939 - commit for CluB

    modified:
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_binlog.h
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
      storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
      storage/ndb/src/ndbapi/ndb_internal.cpp
      storage/ndb/src/ndbapi/ndb_internal.hpp
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2012-03-27 11:21:10 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2012-03-28 09:50:15 +0000
@@ -2074,7 +2074,7 @@ static void ndb_report_waiting(const cha
 {
   ulonglong ndb_latest_epoch= 0;
   const char *proc_info= "<no info>";
-  pthread_mutex_lock(&injector_mutex);
+  wakeup_and_lock(injector_mutex, injector_ndb);
   if (injector_ndb)
     ndb_latest_epoch= injector_ndb->getLatestGCI();
   if (injector_thd)
@@ -2606,9 +2606,18 @@ static
 pthread_mutex_t &
 wakeup_and_lock(pthread_mutex_t& injector_mutex, Ndb * injector_ndb)
 {
-  Ndb_internal::block_and_try_wakeup_event_poller(injector_ndb);
+  if (injector_ndb)
+  {
+    Ndb_internal::block_and_try_wakeup_event_poller(injector_ndb);
+  }
+
   pthread_mutex_lock(&injector_mutex);
-  Ndb_internal::unblock_event_poller(injector_ndb);
+
+  if (injector_ndb)
+  {
+    Ndb_internal::unblock_event_poller(injector_ndb);
+  }
+
   return injector_mutex;
 }
 
@@ -7551,8 +7560,8 @@ ndbcluster_show_status_binlog(THD* thd,
   uint buflen;
   ulonglong ndb_latest_epoch= 0;
   DBUG_ENTER("ndbcluster_show_status_binlog");
-  
-  pthread_mutex_lock(&injector_mutex);
+
+  wakeup_and_lock(injector_mutex, injector_ndb);
   if (injector_ndb)
   {
     char buff1[22],buff2[22],buff3[22],buff4[22],buff5[22];

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4907 to 4908)Bug#12319939Jonas Oreland28 Mar