List:Commits« Previous MessageNext Message »
From:jonas Date:January 26 2007 3:39pm
Subject:bk commit into 5.1 tree (jonas:1.2103)
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-26 15:39:28+01:00, jonas@stripped +7 -0
  ndb - add check if min dbversion >= READ_PACKED
    so that api can have higher version than mindbversion

  storage/ndb/include/ndb_version.h.in@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +1 -0
    add define for read_packed

  storage/ndb/include/ndbapi/NdbOperation.hpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +2 -1
    add mindbversion to preparesend, so it will now how to prepare

  storage/ndb/src/ndbapi/ClusterMgr.cpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +6 -0
    add min dbversion

  storage/ndb/src/ndbapi/ClusterMgr.hpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +1 -0
    add mindbversion to preparesend, so it will now how to prepare

  storage/ndb/src/ndbapi/NdbOperationExec.cpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +4 -2
    add mindbversion to preparesend, so it will now how to prepare

  storage/ndb/src/ndbapi/NdbTransaction.cpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +3 -1
    add mindbversion to preparesend, so it will now how to prepare

  storage/ndb/src/ndbapi/TransporterFacade.hpp@stripped, 2007-01-26 15:39:27+01:00,
jonas@stripped +6 -0
    add mindbversion to preparesend, so it will now how to prepare

# 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/drop6

--- 1.8/storage/ndb/include/ndb_version.h.in	2007-01-26 15:39:32 +01:00
+++ 1.9/storage/ndb/include/ndb_version.h.in	2007-01-26 15:39:32 +01:00
@@ -60,6 +60,7 @@
 #define NDBD_NODE_VERSION_REP MAKE_VERSION(5,1,3)
 #define NDBD_255_NODES_VERSION MAKE_VERSION(5,2,0)
 #define NDBD_QMGR_APIFAIL_REQ MAKE_VERSION(5,1,4)
+#define NDBD_READ_PACKED_VERSION MAKE_VERSION(5,2,0)
 
 #endif
  

--- 1.34/storage/ndb/include/ndbapi/NdbOperation.hpp	2007-01-26 15:39:32 +01:00
+++ 1.35/storage/ndb/include/ndbapi/NdbOperation.hpp	2007-01-26 15:39:32 +01:00
@@ -820,7 +820,8 @@
 
   int    doSend(int ProcessorId, Uint32 lastFlag);
   virtual int	 prepareSend(Uint32  TC_ConnectPtr,
-                             Uint64  TransactionId);
+                             Uint64  TransactionId,
+			     Uint32 minDbVersion);
   virtual void   setLastFlag(NdbApiSignal* signal, Uint32 lastFlag);
     
   int	 prepareSendInterpreted();            // Help routine to prepare*

--- 1.28/storage/ndb/src/ndbapi/ClusterMgr.cpp	2007-01-26 15:39:32 +01:00
+++ 1.29/storage/ndb/src/ndbapi/ClusterMgr.cpp	2007-01-26 15:39:32 +01:00
@@ -70,6 +70,7 @@
   noOfAliveNodes= 0;
   noOfConnectedNodes= 0;
   theClusterMgrThread= 0;
+  m_min_db_version = 0;
   DBUG_VOID_RETURN;
 }
 
@@ -319,6 +320,7 @@
 					      node.m_info.m_version);
   }
 
+  Uint32 minVersion = apiRegConf->minDbVersion;
   if (node.m_info.m_version >= NDBD_255_NODES_VERSION)
   {
     node.m_state = apiRegConf->nodeState;
@@ -332,6 +334,7 @@
     if (node.m_info.m_version < NDBD_NODE_VERSION_REP)
     {
       ptr--;
+      minVersion = 0;
     }
     memcpy(&node.m_state, &apiRegConf->nodeState, sizeof(node.m_state) - 24);
   }
@@ -345,6 +348,9 @@
   node.m_info.m_heartbeat_cnt = 0;
   node.hbCounter = 0;
   node.hbFrequency = (apiRegConf->apiHeartbeatFrequency * 10) - 50;
+
+  if (minVersion)
+    m_min_db_version = minVersion;
 }
 
 void

--- 1.12/storage/ndb/src/ndbapi/ClusterMgr.hpp	2007-01-26 15:39:32 +01:00
+++ 1.13/storage/ndb/src/ndbapi/ClusterMgr.hpp	2007-01-26 15:39:32 +01:00
@@ -80,6 +80,7 @@
   bool          isClusterAlive() const;
   void          hb_received(NodeId);
 
+  Uint32 m_min_db_version;
 private:
   Uint32        noOfAliveNodes;
   Uint32        noOfConnectedNodes;

--- 1.51/storage/ndb/src/ndbapi/NdbTransaction.cpp	2007-01-26 15:39:32 +01:00
+++ 1.52/storage/ndb/src/ndbapi/NdbTransaction.cpp	2007-01-26 15:39:32 +01:00
@@ -504,6 +504,8 @@
   DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: %x, anyObject: %x", 
 		       aTypeOfExec, aCallback, anyObject));
 
+  Uint32 minDbVer = theNdb->theImpl->m_transporter_facade->getMinDbVersion();
+
   /**
    * Reset error.code on execute
    */
@@ -634,7 +636,7 @@
     int tReturnCode;
     NdbOperation* tNextOp = tOp->next();
 
-    tReturnCode = tOp->prepareSend(theTCConPtr, theTransactionId);
+    tReturnCode = tOp->prepareSend(theTCConPtr, theTransactionId, minDbVer);
     if (tReturnCode == -1) {
       theSendStatus = sendABORTfail;
       DBUG_VOID_RETURN;

--- 1.24/storage/ndb/src/ndbapi/NdbOperationExec.cpp	2007-01-26 15:39:32 +01:00
+++ 1.25/storage/ndb/src/ndbapi/NdbOperationExec.cpp	2007-01-26 15:39:32 +01:00
@@ -169,7 +169,8 @@
 Remark:         Puts the the data into TCKEYREQ signal and optional KEYINFO and ATTRINFO
signals.
 ***************************************************************************/
 int
-NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
+NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId, 
+			  Uint32 minDbVer)
 {
   Uint32 tTransId1, tTransId2;
   Uint32 tReqInfo;
@@ -203,7 +204,8 @@
       else if (tOpType != DeleteRequest)
       {
 	assert(tOpType == ReadRequest || tOpType == ReadExclusive);
-	tTotalCurrAI_Len = repack_read(tTotalCurrAI_Len);
+	if (minDbVer >= NDBD_READ_PACKED_VERSION)
+	  tTotalCurrAI_Len = repack_read(tTotalCurrAI_Len);
       }
     } else {
       setErrorCodeAbort(4005);      

--- 1.32/storage/ndb/src/ndbapi/TransporterFacade.hpp	2007-01-26 15:39:32 +01:00
+++ 1.33/storage/ndb/src/ndbapi/TransporterFacade.hpp	2007-01-26 15:39:32 +01:00
@@ -83,6 +83,7 @@
   bool   getIsNodeSendable(NodeId nodeId) const;
   Uint32 getNodeGrp(NodeId nodeId) const;
   Uint32 getNodeSequence(NodeId nodeId) const;
+  Uint32 getMinDbVersion() const ;
 
   // Is there space in sendBuffer to send messages
   bool   check_send_size(Uint32 node_id, Uint32 send_size);
@@ -339,6 +340,11 @@
   return theClusterMgr->getNodeInfo(n).m_state.nodeGroup;
 }
 
+inline
+Uint32
+TransporterFacade::getMinDbVersion() const {
+  return theClusterMgr->m_min_db_version;
+}
 
 inline
 bool
Thread
bk commit into 5.1 tree (jonas:1.2103)jonas26 Jan