List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:November 8 2010 10:41am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (msabaratnam:3952)
View as plain text  
#At file:///export/tmp/maitrayi/mysql-src/repo-7.0/mysql-5.1-telco-7.0-bug/ based on revid:martin.zaun@stripped

 3952 Maitrayi Sabaratnam	2010-11-08 [merge]
      Merge

    modified:
      sql/ha_ndbcluster.cc
      storage/ndb/include/ndbapi/ndb_cluster_connection.hpp
      storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
      storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
=== modified file 'sql/ha_ndbcluster.cc'

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-11-05 15:04:12 +0000
+++ b/sql/ha_ndbcluster.cc	2010-11-08 10:41:09 +0000
@@ -14067,7 +14067,7 @@
     
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while ((id= g_ndb_cluster_connection->get_next_node(iter)))
+    while ((id= g_ndb_cluster_connection->get_next_alive_node(iter)))
     {
       init_fill_schema_files_row(table);
       NdbDictionary::Datafile df= dict->getDatafile(id, elt.name);
@@ -14199,7 +14199,7 @@
 
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while ((id= g_ndb_cluster_connection->get_next_node(iter)))
+    while ((id= g_ndb_cluster_connection->get_next_alive_node(iter)))
     {
       NdbDictionary::Undofile uf= dict->getUndofile(id, elt.name);
       ndberr= dict->getNdbError();

=== modified file 'storage/ndb/include/ndbapi/ndb_cluster_connection.hpp'
--- a/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp	2010-05-04 14:34:54 +0000
+++ b/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp	2010-11-03 11:56:56 +0000
@@ -182,6 +182,7 @@
 
   void init_get_next_node(Ndb_cluster_connection_node_iter &iter);
   unsigned int get_next_node(Ndb_cluster_connection_node_iter &iter);
+  unsigned int get_next_alive_node(Ndb_cluster_connection_node_iter &iter);
   unsigned get_active_ndb_objects() const;
   
   Uint64 *get_latest_trans_gci();

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection.cpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-10-07 05:39:39 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-11-03 11:56:56 +0000
@@ -195,6 +195,28 @@
   return node.id;
 }
 
+Uint32
+Ndb_cluster_connection_impl::get_next_alive_node(Ndb_cluster_connection_node_iter &iter)
+{
+  Uint32 id;
+
+  TransporterFacade *tp = m_impl.m_transporter_facade;
+  if (tp == 0 || tp->ownId() == 0)
+    return 0;
+
+  while (id = get_next_node(iter))
+  {
+    tp->lock_mutex();
+    if (tp->get_node_alive(id) != 0)
+    {
+      tp->unlock_mutex();
+      return id;
+    }
+    tp->unlock_mutex();
+  }
+  return 0;
+}
+
 unsigned
 Ndb_cluster_connection::no_db_nodes()
 {
@@ -816,6 +838,12 @@
   return m_impl.get_next_node(iter);
 }
 
+unsigned int 
+Ndb_cluster_connection::get_next_alive_node(Ndb_cluster_connection_node_iter &iter)
+{
+  return m_impl.get_next_alive_node(iter);
+}
+
 unsigned
 Ndb_cluster_connection::get_active_ndb_objects() const
 {

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-09-30 11:52:49 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-11-03 11:56:56 +0000
@@ -63,6 +63,7 @@
 
   void init_get_next_node(Ndb_cluster_connection_node_iter &iter);
   Uint32 get_next_node(Ndb_cluster_connection_node_iter &iter);
+  Uint32 get_next_alive_node(Ndb_cluster_connection_node_iter &iter);
 
   inline unsigned get_connect_count() const;
 public:

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.0 branch (msabaratnam:3952) Maitrayi Sabaratnam8 Nov