List:Commits« Previous MessageNext Message »
From:jonas Date:January 20 2007 2:02am
Subject:bk commit into 5.1 tree (jonas:1.2396)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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, 2007-01-20 03:02:39+01:00, jonas@stripped +2 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-work
  into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
  MERGE: 1.2343.9.26

  storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp@stripped, 2007-01-20 03:02:36+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.14.1.3

  storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2007-01-20 03:02:36+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.42.1.5

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/mysql-5.1-new-ndb/RESYNC

--- 1.16/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp	2007-01-20 03:02:44 +01:00
+++ 1.17/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp	2007-01-20 03:02:44 +01:00
@@ -454,6 +454,12 @@
   void recompute_version_info(Uint32 type, Uint32 version);
   void execNODE_VERSION_REP(Signal* signal);
   void sendApiVersionRep(Signal* signal, NodeRecPtr nodePtr);
+  void sendVersionedDb(NodeReceiverGroup rg,
+                       GlobalSignalNumber gsn, 
+                       Signal* signal, 
+                       Uint32 length, 
+                       JobBufferLevel jbuf,
+                       Uint32 minversion);
 };
 
 #endif

--- 1.45/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2007-01-20 03:02:44 +01:00
+++ 1.46/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2007-01-20 03:02:44 +01:00
@@ -2785,30 +2785,12 @@
     
     recompute_version_info(type, version);
     
-    if (info.m_type[NodeInfo::DB].m_min_version >= NDBD_NODE_VERSION_REP)
-    {
-      jam();
-      NodeReceiverGroup rg(QMGR, c_clusterNodes);
-      rg.m_nodes.clear(getOwnNodeId());
-      signal->theData[0] = apiNodePtr.i;
-      signal->theData[1] = version;
-      sendSignal(rg, GSN_NODE_VERSION_REP, signal, 2, JBB);
-    }
-    else
-    {
-      Uint32 i = 0;
-      while((i = c_clusterNodes.find(i + 1)) != NdbNodeBitmask::NotFound)
-      {
-	jam();
-	if (i == getOwnNodeId())
-	  continue;
-	if (getNodeInfo(i).m_version >= NDBD_NODE_VERSION_REP)
-	{
-	  jam();
-	  sendSignal(calcQmgrBlockRef(i), GSN_NODE_VERSION_REP, signal, 2,JBB);
-	}
-      }
-    }
+    signal->theData[0] = apiNodePtr.i;
+    signal->theData[1] = version;
+    NodeReceiverGroup rg(QMGR, c_clusterNodes);
+    rg.m_nodes.clear(getOwnNodeId());
+    sendVersionedDb(rg, GSN_NODE_VERSION_REP, signal, 2, JBB, 
+		    NDBD_NODE_VERSION_REP);
     
     signal->theData[0] = apiNodePtr.i;
     EXECUTE_DIRECT(NDBCNTR, GSN_API_START_REP, signal, 1);
@@ -2816,6 +2798,38 @@
   return;
 }//Qmgr::execAPI_REGREQ()
 
+void
+Qmgr::sendVersionedDb(NodeReceiverGroup rg,
+		      GlobalSignalNumber gsn, 
+		      Signal* signal, 
+		      Uint32 length, 
+		      JobBufferLevel jbuf,
+		      Uint32 minversion)
+{
+  jam();
+  NodeVersionInfo info = getNodeVersionInfo();
+  if (info.m_type[NodeInfo::DB].m_min_version >= minversion)
+  {
+    jam();
+    sendSignal(rg, gsn, signal, length, jbuf);
+  }
+  else
+  {
+    jam();
+    Uint32 i = 0, cnt = 0;
+    while((i = rg.m_nodes.find(i + 1)) != NodeBitmask::NotFound)
+    {
+      jam();
+      if (getNodeInfo(i).m_version >= minversion)
+      {
+	jam();
+	cnt++;
+	sendSignal(numberToRef(rg.m_block, i), gsn, signal, length, jbuf);
+      }
+    }
+    ndbassert(cnt < rg.m_nodes.count());
+  }
+}
 
 void
 Qmgr::execAPI_VERSION_REQ(Signal * signal) {
Thread
bk commit into 5.1 tree (jonas:1.2396)jonas20 Jan