List:Commits« Previous MessageNext Message »
From:jonas oreland Date:December 16 2010 3:33pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4062)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4062 jonas oreland	2010-12-16
      ndb - ndbapi refectoring: 1) make signal in TransporterFacade::sendSignal const 2) remove special handling of SignalSender wrt to TransporterFacade

    modified:
      storage/ndb/src/ndbapi/ClusterMgr.cpp
      storage/ndb/src/ndbapi/NdbApiSignal.hpp
      storage/ndb/src/ndbapi/SignalSender.cpp
      storage/ndb/src/ndbapi/SignalSender.hpp
      storage/ndb/src/ndbapi/TransporterFacade.cpp
      storage/ndb/src/ndbapi/TransporterFacade.hpp
      storage/ndb/src/ndbapi/trp_client.hpp
=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-12-15 06:07:35 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-12-16 15:33:19 +0000
@@ -609,8 +609,9 @@ ClusterMgr::execAPI_REGREQ(const Uint32 
   conf->minDbVersion= 0;
   conf->nodeState= node.m_state;
 
-  if (theFacade.sendSignalUnCond(&signal, nodeId) == SEND_OK)
-    node.set_confirmed(true);
+  node.set_confirmed(true);
+  if (!theFacade.sendSignalUnCond(&signal, nodeId) == SEND_OK)
+    node.set_confirmed(false);
 }
 
 void

=== modified file 'storage/ndb/src/ndbapi/NdbApiSignal.hpp'
--- a/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2010-09-30 09:32:28 +0000
+++ b/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2010-12-16 15:33:19 +0000
@@ -71,6 +71,7 @@ public:  
  
    const Uint32 *       getDataPtr() const;
          Uint32 *       getDataPtrSend();
+   const Uint32 *       getConstDataPtrSend() const;
    STATIC_CONST(        MaxSignalWords = 25);
 
   NodeId                get_sender_node();
@@ -87,7 +88,12 @@ public:  
   Uint32 getFragmentId() const { 
     return (m_fragmentInfo == 0 ? 0 : getDataPtr()[theLength - 1]); 
   }
-  
+
+  NdbApiSignal& operator=(const NdbApiSignal& src) {
+    copyFrom(&src);
+    return *this;
+  }
+
 private:
   void setDataPtr(Uint32 *);
   
@@ -215,6 +221,13 @@ NdbApiSignal::getDataPtrSend(){
 }
 
 inline
+const Uint32 *
+NdbApiSignal::getConstDataPtrSend() const
+{
+  return (Uint32*)&theData[0];
+}
+
+inline
 void
 NdbApiSignal::setDataPtr(Uint32 * ptr){
   theRealData = ptr;

=== modified file 'storage/ndb/src/ndbapi/SignalSender.cpp'
--- a/storage/ndb/src/ndbapi/SignalSender.cpp	2010-12-15 06:07:35 +0000
+++ b/storage/ndb/src/ndbapi/SignalSender.cpp	2010-12-16 15:33:19 +0000
@@ -25,23 +25,36 @@
 #include <signaldata/TestOrd.hpp>
 
 
-SimpleSignal::SimpleSignal(bool dealloc){
-  memset(this, 0, sizeof(* this));
+SimpleSignal::SimpleSignal(bool dealloc)
+  : header((BlockReference)0)
+{
+  memset(ptr, 0, sizeof(ptr));
   deallocSections = dealloc;
 }
 
 SimpleSignal::SimpleSignal(const SimpleSignal& src)
+  : header(src.header)
 {
-  this->operator=(src);
+  deallocSections = true;
+
+  for (Uint32 i = 0; i<NDB_ARRAY_SIZE(ptr); i++)
+  {
+    ptr[i].p = 0;
+    if (src.ptr[i].p != 0)
+    {
+      ptr[i].p = new Uint32[src.ptr[i].sz];
+      ptr[i].sz = src.ptr[i].sz;
+      memcpy(ptr[i].p, src.ptr[i].p, 4 * src.ptr[i].sz);
+    }
+  }
 }
 
+
 SimpleSignal&
 SimpleSignal::operator=(const SimpleSignal& src)
 {
   deallocSections = true;
   header = src.header;
-  memcpy(theData, src.theData, sizeof(theData));
-
   for (Uint32 i = 0; i<NDB_ARRAY_SIZE(ptr); i++)
   {
     ptr[i].p = 0;
@@ -70,12 +83,9 @@ SimpleSignal::~SimpleSignal(){
 
 void 
 SimpleSignal::set(class SignalSender& ss,
-		  Uint8  trace, Uint16 recBlock, Uint16 gsn, Uint32 len){
-  
-  header.theTrace                = trace;
-  header.theReceiversBlockNumber = recBlock;
-  header.theVerId_signalNumber   = gsn;
-  header.theLength               = len;
+		  Uint8  trace, Uint16 recBlock, Uint16 gsn, Uint32 len)
+{
+  header.set(trace, recBlock, gsn, len);
   header.theSendersBlockRef      = refToBlock(ss.getOwnRef());
 }
 
@@ -83,7 +93,7 @@ void
 SimpleSignal::print(FILE * out) const {
   fprintf(out, "---- Signal ----------------\n");
   SignalLoggerManager::printSignalHeader(out, header, 0, 0, false);
-  SignalLoggerManager::printSignalData(out, header, theData);
+  SignalLoggerManager::printSignalData(out, header, getDataPtr());
   for(Uint32 i = 0; i<header.m_noOfSections; i++){
     Uint32 len = ptr[i].sz;
     fprintf(out, " --- Section %d size=%d ---\n", i, len);
@@ -183,7 +193,6 @@ SignalSender::sendSignal(Uint16 nodeId,
   return sendSignal(nodeId, &sig);
 }
 
-
 int
 SignalSender::sendFragmentedSignal(Uint16 nodeId,
                                    SimpleSignal& sig,
@@ -192,12 +201,32 @@ SignalSender::sendFragmentedSignal(Uint1
 {
   sig.set(*this, TestOrd::TraceAPI, recBlock, gsn, len);
 
-  return theFacade->sendFragmentedSignal((NdbApiSignal*)&sig.header,
-                                         nodeId,
-                                         &sig.ptr[0],
-                                         sig.header.m_noOfSections);
+  int ret = raw_sendFragmentedSignal(&sig.header,
+                                     nodeId,
+                                     &sig.ptr[0],
+                                     sig.header.m_noOfSections);
+  if (ret == 0)
+  {
+    forceSend();
+    return SEND_OK;
+  }
+  return SEND_DISCONNECTED;
 }
 
+SendStatus
+SignalSender::sendSignal(Uint16 nodeId, const SimpleSignal * s)
+{
+  int ret = raw_sendSignal((NdbApiSignal*)&s->header,
+                           nodeId,
+                           s->ptr,
+                           s->header.m_noOfSections);
+  if (ret == 0)
+  {
+    forceSend();
+    return SEND_OK;
+  }
+  return SEND_DISCONNECTED;
+}
 
 template<class T>
 SimpleSignal *
@@ -267,7 +296,6 @@ SignalSender::trp_deliver_signal(const N
 {
   SimpleSignal * s = new SimpleSignal(true);
   s->header = * signal;
-  memcpy(&s->theData[0], signal->getDataPtr(), 4 * s->header.theLength);
   for(Uint32 i = 0; i<s->header.m_noOfSections; i++){
     s->ptr[i].p = new Uint32[ptr[i].sz];
     s->ptr[i].sz = ptr[i].sz;

=== modified file 'storage/ndb/src/ndbapi/SignalSender.hpp'
--- a/storage/ndb/src/ndbapi/SignalSender.hpp	2010-11-09 20:40:03 +0000
+++ b/storage/ndb/src/ndbapi/SignalSender.hpp	2010-12-16 15:33:19 +0000
@@ -22,6 +22,7 @@
 #include <ndb_global.h>
 #include "TransporterFacade.hpp"
 #include "trp_client.hpp"
+#include "NdbApiSignal.hpp"
 #include <Vector.hpp>
 
 #include <signaldata/TestOrd.hpp>
@@ -45,42 +46,21 @@ public:
   void set(class SignalSender&,
 	   Uint8  trace, Uint16 recBlock, Uint16 gsn, Uint32 len);
   
-  struct SignalHeader header;
-  union {
-    Uint32 theData[25];
-    ResumeReq _ResumeReq;
-    TestOrd _TestOrd;
-    DumpStateOrd _DumpStateOrd;
-    StartOrd _StartOrd;
-    ApiVersionReq _ApiVersionReq;
-    StopReq _StopReq;
-    EventSubscribeReq _EventSubscribeReq;
-    SetLogLevelOrd _SetLogLevelOrd;
-    TamperOrd _TamperOrd;
-    AllocNodeIdReq _AllocNodeIdReq;
-    BackupReq _BackupReq;
-    AbortBackupOrd _AbortBackupOrd;
-  };
+  NdbApiSignal header;
   LinearSectionPtr ptr[3];
 
-  int readSignalNumber() const {return header.theVerId_signalNumber; }
-  Uint32 *getDataPtrSend() { return theData; }
-  const Uint32 *getDataPtr() const { return theData; }
-  Uint32 getLength() const { return header.theLength; }
+  int readSignalNumber() const { return header.readSignalNumber(); };
+  Uint32 *getDataPtrSend() { return header.getDataPtrSend(); }
+  const Uint32 *getDataPtr() const { return header.getDataPtr(); }
+  Uint32 getLength() const { return header.getLength(); }
 
   /**
    * Fragmentation
    */
-  bool isFragmented() const { return header.m_fragmentInfo != 0;}
-  bool isFirstFragment() const { return header.m_fragmentInfo <= 1;}
-  bool isLastFragment() const { 
-    return header.m_fragmentInfo == 0 || header.m_fragmentInfo == 3; 
-  }
-
-
-  Uint32 getFragmentId() const {
-    return (header.m_fragmentInfo == 0 ? 0 : getDataPtr()[header.theLength - 1]);
-  }
+  bool isFragmented() const { return header.isFragmented(); }
+  bool isFirstFragment() const { return header.isFirstFragment(); }
+  bool isLastFragment() const { return header.isLastFragment(); };
+  Uint32 getFragmentId() const { return header.getFragmentId(); };
 
   void print(FILE * out = stdout) const;
   SimpleSignal& operator=(const SimpleSignal&);

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-12-15 06:07:35 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-12-16 15:33:19 +0000
@@ -856,22 +856,21 @@ TransporterFacade::checkForceSend(Uint32
  * SEND SIGNAL METHODS
  *****************************************************************************/
 int
-TransporterFacade::sendSignal(NdbApiSignal * aSignal, NodeId aNode)
+TransporterFacade::sendSignal(const NdbApiSignal * aSignal, NodeId aNode)
 {
-  Uint32* tDataPtr = aSignal->getDataPtrSend();
+  const Uint32* tDataPtr = aSignal->getConstDataPtrSend();
   Uint32 Tlen = aSignal->theLength;
   Uint32 TBno = aSignal->theReceiversBlockNumber;
 #ifdef API_TRACE
   if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
-    Uint32 tmp = aSignal->theSendersBlockRef;
-    aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
+    SignalHeader tmp = * aSignal;
+    tmp.theSendersBlockRef = numberToRef(aSignal->theSendersBlockRef, theOwnId);
     LinearSectionPtr ptr[3];
-    signalLogger.sendSignal(* aSignal,
+    signalLogger.sendSignal(tmp,
                             1,
                             tDataPtr,
                             aNode, ptr, 0);
     signalLogger.flushSignalLog();
-    aSignal->theSendersBlockRef = tmp;
   }
 #endif
   if ((Tlen != 0) && (Tlen <= 25) && (TBno != 0)) {
@@ -881,6 +880,11 @@ TransporterFacade::sendSignal(NdbApiSign
                                                         aNode,
                                                         (LinearSectionPtr*)0);
     //if (ss != SEND_OK) ndbout << ss << endl;
+    if (ss == SEND_OK)
+    {
+      assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+             aSignal->readSignalNumber() == GSN_API_REGREQ);
+    }
     return (ss == SEND_OK ? 0 : -1);
   }
   else
@@ -893,23 +897,23 @@ TransporterFacade::sendSignal(NdbApiSign
 }
 
 int
-TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, 
+TransporterFacade::sendSignalUnCond(const NdbApiSignal * aSignal,
                                     NodeId aNode,
                                     Uint32 prio)
 {
-  Uint32* tDataPtr = aSignal->getDataPtrSend();
+  const Uint32* tDataPtr = aSignal->getConstDataPtrSend();
   assert(prio <= 1);
 #ifdef API_TRACE
-  if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
-    Uint32 tmp = aSignal->theSendersBlockRef;
-    aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
+  if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber))
+  {
+    SignalHeader tmp = * aSignal;
+    tmp.theSendersBlockRef = numberToRef(aSignal->theSendersBlockRef, theOwnId);
     LinearSectionPtr ptr[3];
-    signalLogger.sendSignal(* aSignal,
-			    prio,
-			    tDataPtr,
-			    aNode, ptr, 0);
+    signalLogger.sendSignal(tmp,
+                            1,
+                            tDataPtr,
+                            aNode, ptr, 0);
     signalLogger.flushSignalLog();
-    aSignal->theSendersBlockRef = tmp;
   }
 #endif
   assert((aSignal->theLength != 0) &&
@@ -921,6 +925,11 @@ TransporterFacade::sendSignalUnCond(NdbA
 						      aNode, 
 						      (LinearSectionPtr*)0);
   
+  if (ss == SEND_OK)
+  {
+    assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+           aSignal->readSignalNumber() == GSN_API_REGREQ);
+  }
   return (ss == SEND_OK ? 0 : -1);
 }
 
@@ -1148,11 +1157,14 @@ public:
  * boundaries to simplify reassembly in the kernel.
  */
 int
-TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal,
+TransporterFacade::sendFragmentedSignal(const NdbApiSignal* inputSignal,
                                         NodeId aNode,
                                         const GenericSectionPtr ptr[3],
                                         Uint32 secs)
 {
+  NdbApiSignal copySignal(* inputSignal);
+  NdbApiSignal* aSignal = &copySignal;
+
   unsigned i;
   Uint32 totalSectionLength= 0;
   for (i= 0; i < secs; i++)
@@ -1165,17 +1177,15 @@ TransporterFacade::sendFragmentedSignal(
   // TODO : Consider tracing fragment signals?
 #ifdef API_TRACE
   if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
-    Uint32 tmp = aSignal->theSendersBlockRef;
-    aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
-    signalLogger.sendSignal(* aSignal,
-			    1,
-			    aSignal->getDataPtrSend(),
-			    aNode,
-			    ptr, secs);
-    aSignal->theSendersBlockRef = tmp;
-    /* Reset section iterators */
-    for(Uint32 s=0; s < secs; s++)
-      ptr[s].sectionIter->reset();
+    SignalHeader tmp = * aSignal;
+    tmp.theSendersBlockRef = numberToRef(aSignal->theSendersBlockRef, theOwnId);
+    signalLogger.sendSignal(tmp,
+                            1,
+                            aSignal->getConstDataPtrSend(),
+                            aNode, ptr, 0);
+    signalLogger.flushSignalLog();
+    for (Uint32 i = 0; i<secs; i++)
+      ptr[i].sectionIter->reset();
   }
 #endif
 
@@ -1271,6 +1281,11 @@ TransporterFacade::sendFragmentedSignal(
 	   &tmp_ptr[start_i]);
 	assert(ss != SEND_MESSAGE_TOO_BIG);
 	if (ss != SEND_OK) return -1;
+        if (ss == SEND_OK)
+        {
+          assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+                 tmp_signal.readSignalNumber() == GSN_API_REGREQ);
+        }
       }
       // setup variables for next signal
       start_i= i;
@@ -1315,10 +1330,15 @@ TransporterFacade::sendFragmentedSignal(
     SendStatus ss = theTransporterRegistry->prepareSend
       (aSignal,
        1/*JBB*/,
-       aSignal->getDataPtrSend(),
+       aSignal->getConstDataPtrSend(),
        aNode,
        &tmp_ptr[start_i]);
     assert(ss != SEND_MESSAGE_TOO_BIG);
+    if (ss == SEND_OK)
+    {
+      assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+             aSignal->readSignalNumber() == GSN_API_REGREQ);
+    }
     ret = (ss == SEND_OK ? 0 : -1);
   }
   aSignal->m_noOfSections = 0;
@@ -1328,7 +1348,8 @@ TransporterFacade::sendFragmentedSignal(
 }
 
 int
-TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
+TransporterFacade::sendFragmentedSignal(const NdbApiSignal* aSignal,
+                                        NodeId aNode,
                                         const LinearSectionPtr ptr[3],
                                         Uint32 secs)
 {
@@ -1358,63 +1379,71 @@ TransporterFacade::sendFragmentedSignal(
   
 
 int
-TransporterFacade::sendSignal(NdbApiSignal* aSignal, NodeId aNode,
+TransporterFacade::sendSignal(const NdbApiSignal* aSignal, NodeId aNode,
                               const LinearSectionPtr ptr[3], Uint32 secs)
 {
-  aSignal->m_noOfSections = secs;
+  Uint32 save = aSignal->m_noOfSections;
+  const_cast<NdbApiSignal*>(aSignal)->m_noOfSections = secs;
 #ifdef API_TRACE
   if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
-    Uint32 tmp = aSignal->theSendersBlockRef;
-    aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
-    signalLogger.sendSignal(* aSignal,
+    SignalHeader tmp = * aSignal;
+    tmp.theSendersBlockRef = numberToRef(aSignal->theSendersBlockRef, theOwnId);
+    LinearSectionPtr ptr[3];
+    signalLogger.sendSignal(tmp,
                             1,
-                            aSignal->getDataPtrSend(),
-                            aNode,
-                            ptr, secs);
+                            aSignal->getConstDataPtrSend(),
+                            aNode, ptr, secs);
     signalLogger.flushSignalLog();
-    aSignal->theSendersBlockRef = tmp;
   }
 #endif
   SendStatus ss = theTransporterRegistry->prepareSend
     (aSignal,
      1, // JBB
-     aSignal->getDataPtrSend(),
+     aSignal->getConstDataPtrSend(),
      aNode,
      ptr);
   assert(ss != SEND_MESSAGE_TOO_BIG);
-  aSignal->m_noOfSections = 0;
+  const_cast<NdbApiSignal*>(aSignal)->m_noOfSections = save;
+  if (ss == SEND_OK)
+  {
+    assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+           aSignal->readSignalNumber() == GSN_API_REGREQ);
+  }
   return (ss == SEND_OK ? 0 : -1);
 }
 
 int
-TransporterFacade::sendSignal(NdbApiSignal* aSignal, NodeId aNode,
+TransporterFacade::sendSignal(const NdbApiSignal* aSignal, NodeId aNode,
                               const GenericSectionPtr ptr[3], Uint32 secs)
 {
-  aSignal->m_noOfSections = secs;
+  Uint32 save = aSignal->m_noOfSections;
+  const_cast<NdbApiSignal*>(aSignal)->m_noOfSections = secs;
 #ifdef API_TRACE
   if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
-    Uint32 tmp = aSignal->theSendersBlockRef;
-    aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
-    signalLogger.sendSignal(* aSignal,
+    SignalHeader tmp = * aSignal;
+    tmp.theSendersBlockRef = numberToRef(aSignal->theSendersBlockRef, theOwnId);
+    signalLogger.sendSignal(tmp,
                             1,
-                            aSignal->getDataPtrSend(),
-                            aNode,
-                            ptr, secs);
+                            aSignal->getConstDataPtrSend(),
+                            aNode, ptr, secs);
     signalLogger.flushSignalLog();
-    aSignal->theSendersBlockRef = tmp;
+    for (Uint32 i = 0; i<secs; i++)
+      ptr[i].sectionIter->reset();
   }
-  /* Reset section iterators */
-  for(Uint32 s=0; s < secs; s++)
-    ptr[s].sectionIter->reset();
 #endif
   SendStatus ss = theTransporterRegistry->prepareSend
     (aSignal,
      1, // JBB
-     aSignal->getDataPtrSend(),
+     aSignal->getConstDataPtrSend(),
      aNode,
      ptr);
   assert(ss != SEND_MESSAGE_TOO_BIG);
-  aSignal->m_noOfSections = 0;
+  const_cast<NdbApiSignal*>(aSignal)->m_noOfSections = save;
+  if (ss == SEND_OK)
+  {
+    assert(theClusterMgr->getNodeInfo(aNode).is_confirmed() ||
+           aSignal->readSignalNumber() == GSN_API_REGREQ);
+  }
   return (ss == SEND_OK ? 0 : -1);
 }
 
@@ -1707,40 +1736,6 @@ template class Vector<trp_client*>;
 
 #include "SignalSender.hpp"
 
-SendStatus
-SignalSender::sendSignal(Uint16 nodeId, const SimpleSignal * s)
-{
-#ifdef API_TRACE
-  if(setSignalLog() && TRACE_GSN(s->header.theVerId_signalNumber)){
-    SignalHeader tmp = s->header;
-    tmp.theSendersBlockRef = getOwnRef();
-
-    LinearSectionPtr ptr[3];
-    signalLogger.sendSignal(tmp,
-			    1,
-			    s->theData,
-			    nodeId, ptr, 0);
-    signalLogger.flushSignalLog();
-  }
-#endif
-
-  SendStatus ss = 
-    theFacade->theTransporterRegistry->prepareSend(&s->header,
-                                                   1, // JBB
-                                                   &s->theData[0],
-                                                   nodeId, 
-                                                   &s->ptr[0]);
-
-  if (ss == SEND_OK)
-  {
-    assert(getNodeInfo(nodeId).is_confirmed() ||
-           s->readSignalNumber() == GSN_API_REGREQ);
-    theFacade->forceSend(m_blockNo);
-  }
-
-  return ss;
-}
-
 const Uint32*
 SignalSectionIterator::getNextWords(Uint32& sz)
 {

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.hpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.hpp	2010-12-03 05:53:47 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.hpp	2010-12-16 15:33:19 +0000
@@ -82,14 +82,14 @@ public:
 
   // Only sends to nodes which are alive
 private:
-  int sendSignal(NdbApiSignal * signal, NodeId nodeId);
-  int sendSignal(NdbApiSignal*, NodeId,
+  int sendSignal(const NdbApiSignal * signal, NodeId nodeId);
+  int sendSignal(const NdbApiSignal*, NodeId,
                  const LinearSectionPtr ptr[3], Uint32 secs);
-  int sendSignal(NdbApiSignal*, NodeId,
+  int sendSignal(const NdbApiSignal*, NodeId,
                  const GenericSectionPtr ptr[3], Uint32 secs);
-  int sendFragmentedSignal(NdbApiSignal*, NodeId,
+  int sendFragmentedSignal(const NdbApiSignal*, NodeId,
                            const LinearSectionPtr ptr[3], Uint32 secs);
-  int sendFragmentedSignal(NdbApiSignal*, NodeId,
+  int sendFragmentedSignal(const NdbApiSignal*, NodeId,
                            const GenericSectionPtr ptr[3], Uint32 secs);
 public:
 
@@ -211,7 +211,7 @@ private:
   friend class NdbImpl;
   friend class NdbTransaction;
 
-  int sendSignalUnCond(NdbApiSignal *, NodeId nodeId, Uint32 prio = 0);
+  int sendSignalUnCond(const NdbApiSignal *, NodeId nodeId, Uint32 prio = 0);
 
   bool isConnected(NodeId aNodeId);
   void doStop();

=== modified file 'storage/ndb/src/ndbapi/trp_client.hpp'
--- a/storage/ndb/src/ndbapi/trp_client.hpp	2010-12-14 09:10:45 +0000
+++ b/storage/ndb/src/ndbapi/trp_client.hpp	2010-12-16 15:33:19 +0000
@@ -47,14 +47,14 @@ public:
 
   void forceSend(int val = 1);
 
-  int raw_sendSignal(NdbApiSignal*, Uint32 nodeId);
-  int raw_sendSignal(NdbApiSignal*, Uint32 nodeId,
+  int raw_sendSignal(const NdbApiSignal*, Uint32 nodeId);
+  int raw_sendSignal(const NdbApiSignal*, Uint32 nodeId,
                      const LinearSectionPtr ptr[3], Uint32 secs);
-  int raw_sendSignal(NdbApiSignal*, Uint32 nodeId,
+  int raw_sendSignal(const NdbApiSignal*, Uint32 nodeId,
                      const GenericSectionPtr ptr[3], Uint32 secs);
-  int raw_sendFragmentedSignal(NdbApiSignal*, Uint32 nodeId,
+  int raw_sendFragmentedSignal(const NdbApiSignal*, Uint32 nodeId,
                                const LinearSectionPtr ptr[3], Uint32 secs);
-  int raw_sendFragmentedSignal(NdbApiSignal*, Uint32 nodeId,
+  int raw_sendFragmentedSignal(const NdbApiSignal*, Uint32 nodeId,
                                const GenericSectionPtr ptr[3], Uint32 secs);
 
   const trp_node & getNodeInfo(Uint32 i) const;
@@ -130,7 +130,7 @@ trp_client::unlock()
 
 inline
 int
-trp_client::raw_sendSignal(NdbApiSignal * signal, Uint32 nodeId)
+trp_client::raw_sendSignal(const NdbApiSignal * signal, Uint32 nodeId)
 {
   assert(m_poll.m_locked);
   return m_facade->sendSignal(signal, nodeId);
@@ -138,7 +138,7 @@ trp_client::raw_sendSignal(NdbApiSignal 
 
 inline
 int
-trp_client::raw_sendSignal(NdbApiSignal * signal, Uint32 nodeId,
+trp_client::raw_sendSignal(const NdbApiSignal * signal, Uint32 nodeId,
                            const LinearSectionPtr ptr[3], Uint32 secs)
 {
   assert(m_poll.m_locked);
@@ -147,7 +147,7 @@ trp_client::raw_sendSignal(NdbApiSignal 
 
 inline
 int
-trp_client::raw_sendSignal(NdbApiSignal * signal, Uint32 nodeId,
+trp_client::raw_sendSignal(const NdbApiSignal * signal, Uint32 nodeId,
                            const GenericSectionPtr ptr[3], Uint32 secs)
 {
   assert(m_poll.m_locked);
@@ -156,7 +156,7 @@ trp_client::raw_sendSignal(NdbApiSignal 
 
 inline
 int
-trp_client::raw_sendFragmentedSignal(NdbApiSignal * signal, Uint32 nodeId,
+trp_client::raw_sendFragmentedSignal(const NdbApiSignal * signal, Uint32 nodeId,
                                      const LinearSectionPtr ptr[3], Uint32 secs)
 {
   assert(m_poll.m_locked);
@@ -165,7 +165,7 @@ trp_client::raw_sendFragmentedSignal(Ndb
 
 inline
 int
-trp_client::raw_sendFragmentedSignal(NdbApiSignal * signal, Uint32 nodeId,
+trp_client::raw_sendFragmentedSignal(const NdbApiSignal * signal, Uint32 nodeId,
                                      const GenericSectionPtr ptr[3],
                                      Uint32 secs)
 {


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101216153319-x329r0e1bz53lkfm.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4062) jonas oreland16 Dec