List:Commits« Previous MessageNext Message »
From:Jan Wedvik Date:July 7 2009 7:50pm
Subject:bzr commit into mysql-5.1-telco-7.0-spj branch (jan.wedvik:2912)
View as plain text  
#At file:///export/home2/tmp/jw1159207/mysql/push_spj/ based on revid:ole.john.aske@stripped

 2912 Jan Wedvik	2009-07-07
      Moved statement for serializing operations from test_spj.cpp to NdbQueryOperation.cpp, so 
      that this happens automatically (as seen from the application).
      
      Removed some unused methods.
      
      Replaced some tabs with spaces (for indentation).

    modified:
      storage/ndb/include/ndbapi/NdbOperation.hpp
      storage/ndb/include/ndbapi/NdbQueryOperation.hpp
      storage/ndb/include/ndbapi/NdbTransaction.hpp
      storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
      storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp
      storage/ndb/src/ndbapi/NdbTransaction.cpp
      storage/ndb/src/ndbapi/Ndbif.cpp
      storage/ndb/test/tools/test_spj.cpp
=== modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbOperation.hpp	2009-06-22 13:22:11 +0000
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp	2009-07-07 19:49:58 +0000
@@ -53,6 +53,7 @@ class NdbOperation
   friend class NdbScanFilterImpl;
   friend class NdbReceiver;
   friend class NdbBlob;
+  friend class NdbQueryImpl;
 #endif
 
 public:

=== modified file 'storage/ndb/include/ndbapi/NdbQueryOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbQueryOperation.hpp	2009-07-06 11:51:39 +0000
+++ b/storage/ndb/include/ndbapi/NdbQueryOperation.hpp	2009-07-07 19:49:58 +0000
@@ -56,19 +56,6 @@ protected:
   ~NdbQuery();
 
 public:
-  // Factory method which instantiate a query from its definition
-  static NdbQuery*
-  buildQuery(NdbTransaction& trans, const NdbQueryDef& queryDef);
-
-  ////////////////////////////////////////////////////////
-  // START: TEMP HACK for Jans result set coding until we
-  // have a usable 'queryDef'
-  static NdbQuery*
-  buildQuery(NdbTransaction& trans);
-
-  // END Jans hack.
-  /////////////////////////////////////////////////
-
   Uint32 getNoOfOperations() const;
 
   // Get a specific NdbQueryOperation by ident specified

=== modified file 'storage/ndb/include/ndbapi/NdbTransaction.hpp'
--- a/storage/ndb/include/ndbapi/NdbTransaction.hpp	2009-06-12 12:01:12 +0000
+++ b/storage/ndb/include/ndbapi/NdbTransaction.hpp	2009-07-07 19:49:58 +0000
@@ -1084,6 +1084,8 @@ private:						
   // optim: any blobs
   bool theBlobFlag;
   Uint8 thePendingBlobOps;
+  /** List of linked queries.*/
+  NdbQueryImpl* m_firstQuery;
   inline bool hasBlobOperation() { return theBlobFlag; }
 
   static void sendTC_COMMIT_ACK(class TransporterFacade *, NdbApiSignal *,

=== modified file 'storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp	2009-07-07 12:09:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp	2009-07-07 19:49:58 +0000
@@ -111,10 +111,15 @@ public:
   const NdbQueryDef& getInterface() const
   { return m_interface; }
 
-  /**TODO: Remove this method. Only needed by testSerialize() test code.*/
+  /** Get serialized representation of query definition.*/
   Uint32Buffer& getSerialized(){
     return m_serializedDef;
   }
+
+  /** Get serialized representation of query definition.*/
+  const Uint32Buffer& getSerialized() const {
+    return m_serializedDef;
+  }
 private:
   NdbQueryDef m_interface;
 

=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2009-07-06 11:51:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2009-07-07 19:49:58 +0000
@@ -31,20 +31,6 @@ NdbQuery::NdbQuery(NdbQueryImpl& impl):
 NdbQuery::~NdbQuery()
 {}
 
-
-//static
-NdbQuery*
-NdbQuery::buildQuery(NdbTransaction& trans, const NdbQueryDef& queryDef)
-{ NdbQueryImpl* query = NdbQueryImpl::buildQuery(trans, queryDef.getImpl());
-  return (query) ? &query->getInterface() : NULL;
-}
-
-NdbQuery*
-NdbQuery::buildQuery(NdbTransaction& trans)  // TEMP hack to be removed
-{ NdbQueryImpl* query = NdbQueryImpl::buildQuery(trans);
-  return (query) ? &query->getInterface() : NULL;
-}
-
 Uint32
 NdbQuery::getNoOfOperations() const
 {
@@ -111,18 +97,6 @@ NdbQueryOperation::NdbQueryOperation(Ndb
 NdbQueryOperation::~NdbQueryOperation()
 {}
 
-// TODO: Remove this factory. Needed for result prototype only.
-// Temp factory for Jan - will be replaced later
-//static
-NdbQueryOperation*
-NdbQueryOperation::buildQueryOperation(NdbQueryImpl& queryImpl,
-                                       class NdbOperation& operation)
-{
-  NdbQueryOperationImpl* op =
-    NdbQueryOperationImpl::buildQueryOperation(queryImpl, operation);
-  return (op) ? &op->getInterface() : NULL;
-}
-
 Uint32
 NdbQueryOperation::getNoOfParentOperations() const
 {
@@ -213,7 +187,9 @@ NdbQueryOperation::isRowChanged() const
 ///////////////////////////////////////////
 /////////  NdbQueryImpl methods ///////////
 ///////////////////////////////////////////
-NdbQueryImpl::NdbQueryImpl(NdbTransaction& trans):
+NdbQueryImpl::NdbQueryImpl(NdbTransaction& trans, 
+                           const NdbQueryDefImpl& queryDef, 
+                           NdbQueryImpl* next):
   m_interface(*this),
   m_magic(MAGIC),
   m_id(trans.getNdb()->theImpl->theNdbObjectIdMap.map(this)),
@@ -221,20 +197,10 @@ NdbQueryImpl::NdbQueryImpl(NdbTransactio
   m_transaction(trans),
   m_operations(),
   m_tcKeyConfReceived(false),
-  m_pendingOperations(0)
-{
-  assert(m_id != NdbObjectIdMap::InvalidId);
-}
-
-NdbQueryImpl::NdbQueryImpl(NdbTransaction& trans, const NdbQueryDefImpl& queryDef):
-  m_interface(*this),
-  m_magic(MAGIC),
-  m_id(trans.getNdb()->theImpl->theNdbObjectIdMap.map(this)),
-  m_error(),
-  m_transaction(trans),
-  m_operations(),
-  m_tcKeyConfReceived(false),
-  m_pendingOperations(0)
+  m_pendingOperations(0),
+  m_next(next),
+  m_ndbOperation(NULL),
+  m_queryDef(queryDef)
 {
   assert(m_id != NdbObjectIdMap::InvalidId);
 
@@ -255,6 +221,14 @@ NdbQueryImpl::NdbQueryImpl(NdbTransactio
     }
 
     m_operations.push_back(op);
+    if(def.getNoOfParentOperations()==0){
+      // TODO: Remove references to NdbOperation class.
+      assert(m_ndbOperation == NULL);
+      m_ndbOperation = m_transaction.getNdbOperation(&def.getTable());
+      m_ndbOperation->readTuple(NdbOperation::LM_Dirty);
+      m_ndbOperation->m_isLinked = true;
+      m_ndbOperation->setQueryImpl(this);
+    }
   }
 }
 
@@ -271,15 +245,11 @@ NdbQueryImpl::~NdbQueryImpl()
 
 //static
 NdbQueryImpl*
-NdbQueryImpl::buildQuery(NdbTransaction& trans, const NdbQueryDefImpl& queryDef)
+NdbQueryImpl::buildQuery(NdbTransaction& trans, 
+                         const NdbQueryDefImpl& queryDef, 
+                         NdbQueryImpl* next)
 {
-  return new NdbQueryImpl(trans, queryDef);
-}
-
-NdbQueryImpl*
-NdbQueryImpl::buildQuery(NdbTransaction& trans)  // TEMP hack to be removed
-{
-  return new NdbQueryImpl(trans);
+  return new NdbQueryImpl(trans, queryDef, next);
 }
 
 Uint32
@@ -338,10 +308,25 @@ NdbQueryImpl::getNdbTransaction() const
 
 void 
 NdbQueryImpl::prepareSend(){
-  m_pendingOperations = m_operations.size();
+  m_pendingOperations = m_operations.size();  
   for(Uint32 i = 0; i < m_operations.size(); i++){
-      m_operations[i]->prepareSend(m_serializedParams);
+    m_operations[i]->prepareSend(m_serializedParams);
   }
+  // TODO: Replace heap allocation.
+  Uint32* tree = new Uint32[m_queryDef.getSerialized().getSize()];
+  for(Uint32 i = 0; i < m_queryDef.getSerialized().getSize(); i++){
+    tree[i] = m_queryDef.getSerialized().get(i);
+  }
+  m_ndbOperation->insertATTRINFOloop(tree, 
+                                     m_queryDef.getSerialized().getSize());
+  delete[] tree;
+  Uint32* params = new Uint32[m_serializedParams.getSize()];
+  for(Uint32 i = 0; i < m_serializedParams.getSize(); i++){
+    params[i] = m_serializedParams.get(i);
+  }
+  m_ndbOperation->insertATTRINFOloop(params, m_serializedParams.getSize());
+  delete[] params; 
+
 #ifdef TRACE_SERIALIZATION
   ndbout << "Serialized params for all : ";
   for(Uint32 i = 0; i < m_serializedParams.getSize(); i++){
@@ -376,47 +361,11 @@ NdbQueryOperationImpl::NdbQueryOperation
   m_children(def.getNoOfChildOperations()),
   m_receiver(queryImpl.getNdbTransaction()->getNdb()),
   m_queryImpl(queryImpl),
-  m_state(State_Initial),
-  m_operation(*((NdbOperation*)NULL))
-{ 
-  assert(m_id != NdbObjectIdMap::InvalidId);
-  m_receiver.init(NdbReceiver::NDB_OPERATION, false, &m_operation);
-}
-
-///////////////////////////////////////////////////////////
-// START: Temp code for Jan until we have a propper NdbQueryOperationDef
-
-/** Only used for result processing prototype purposes. To be removed.*/
-NdbQueryOperationImpl::NdbQueryOperationImpl(NdbQueryImpl& queryImpl, 
-					     NdbOperation& operation):
-  m_interface(*this),
-  m_magic(MAGIC),
-  m_id(queryImpl.getNdbTransaction()->getNdb()->theImpl
-       ->theNdbObjectIdMap.map(this)),
-  m_operationDef(*reinterpret_cast<NdbQueryOperationDefImpl*>(NULL)),
-  m_parents(),
-  m_children(),
-  m_receiver(queryImpl.getNdbTransaction()->getNdb()),
-  m_queryImpl(queryImpl),
-  m_state(State_Initial),
-  m_operation(operation)
+  m_state(State_Initial)
 { 
   assert(m_id != NdbObjectIdMap::InvalidId);
-  m_receiver.init(NdbReceiver::NDB_OPERATION, false, &operation);
-  queryImpl.addQueryOperation(this);
-}
-
-// Temp factory for Jan - will be removed later
-// static
-NdbQueryOperationImpl*
-NdbQueryOperationImpl::buildQueryOperation(NdbQueryImpl& queryImpl,
-                                       class NdbOperation& operation)
-{
-  NdbQueryOperationImpl* op = new NdbQueryOperationImpl(queryImpl, operation);
-  return op;
+  m_receiver.init(NdbReceiver::NDB_OPERATION, false, NULL);
 }
-// END temp code
-//////////////////////////////////////////////////////////
 
 Uint32
 NdbQueryOperationImpl::getNoOfParentOperations() const
@@ -457,7 +406,7 @@ NdbQueryOperationImpl::getQuery() const
 NdbRecAttr*
 NdbQueryOperationImpl::getValue(
                             const char* anAttrName,
-			    char* aValue)
+                            char* aValue)
 {
   return NULL; // FIXME
 }
@@ -465,7 +414,7 @@ NdbQueryOperationImpl::getValue(
 NdbRecAttr*
 NdbQueryOperationImpl::getValue(
                             Uint32 anAttrId, 
-			    char* aValue)
+                            char* aValue)
 {
   return NULL; // FIXME
 }
@@ -473,7 +422,7 @@ NdbQueryOperationImpl::getValue(
 NdbRecAttr*
 NdbQueryOperationImpl::getValue(
                             const NdbDictionary::Column* column, 
-			    char* aValue)
+                            char* aValue)
 {
   /* This code will only work for the lookup example in test_spj.cpp.
    */

=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp	2009-07-06 11:51:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp	2009-07-07 19:49:58 +0000
@@ -32,32 +32,17 @@ class NdbQueryImpl {
 private:
   // Only constructable from factory ::buildQuery();
   explicit NdbQueryImpl(NdbTransaction& trans, 
-			const NdbQueryDefImpl& queryDef);
+                        const NdbQueryDefImpl& queryDef, NdbQueryImpl* next);
 
   ~NdbQueryImpl();
 public:
   STATIC_CONST (MAGIC = 0xdeadface);
 
   // Factory method which instantiate a query from its definition
-  static NdbQueryImpl*
-  buildQuery(NdbTransaction& trans, const NdbQueryDefImpl& queryDef);
+  static NdbQueryImpl* buildQuery(NdbTransaction& trans, 
+                                  const NdbQueryDefImpl& queryDef, 
+                                  NdbQueryImpl* next);
 
-  ///////////////////////////////////////////////////
-  // START: Temp hacks for Jans result set coding 
-  explicit NdbQueryImpl(NdbTransaction& trans);  // TEMP, will be removed
-
-  static NdbQueryImpl*
-  buildQuery(NdbTransaction& trans);
-
-  /** Set an NdbQueryOperation to be the root of a linked operation */
-  // LATER: root and *all* NdbQueryOperations will be constructed 
-  // together with NdbQuery itself in :.buildQuery()
-  void addQueryOperation(NdbQueryOperationImpl* op) {
-    m_operations.push_back(op);
-  }
-  //// END: TEMP hacks
-  //////////////////////////////////////////////////
-  
   Uint32 getNoOfOperations() const;
 
   // Get a specific NdbQueryOperation by ident specified
@@ -92,11 +77,6 @@ public:
     return --m_pendingOperations==0 && m_tcKeyConfReceived;
   }
 
-  /**TODO: Remove this method. Only needed by testSerialize() test code.*/
-  Uint32Buffer& getSerialized(){
-    return m_serializedParams;
-  }
-
   /** Prepare NdbReceiver objects for receiving the first results batch.*/
   void prepareSend();
 
@@ -111,7 +91,12 @@ public:
 
   NdbQuery& getInterface()
   { return m_interface; }
+  
+  /** Get next query in same transaction.*/
+  NdbQueryImpl* getNext() const {return m_next;}
 
+  /** TODO: Remove. Temporary hack for prototype.*/
+  NdbOperation* getNdbOperation() const {return m_ndbOperation;}
 private:
   NdbQuery m_interface;
 
@@ -131,9 +116,14 @@ private:
   int m_pendingOperations;
   /** Serialized representation of parameters. To be sent in TCKEYREQ*/
   Uint32Buffer m_serializedParams;
+  /** Next query in same transaction.*/
+  NdbQueryImpl* const m_next;
+  /** TODO: Remove this.*/
+  NdbOperation* m_ndbOperation;
+  /** Definition of this query.*/
+  const NdbQueryDefImpl& m_queryDef;
 }; // class NdbQueryImpl
 
-
 /** This class contains data members for NdbQueryOperation, such that these
  * do not need to exposed in NdbQueryOperation.hpp. This class may be 
  * changed without forcing the customer to recompile his application.*/
@@ -197,9 +187,6 @@ public:
     child.m_parents.push_back(this);
   }
 
-  NdbOperation& getOperation() const{
-    return m_operation;
-  }
   // End: Hack
   //////////////////////////////////////////////
 
@@ -261,12 +248,8 @@ private:
   NdbQueryImpl& m_queryImpl;
   /** Progress of operation.*/
   State m_state;
-  /** TODO:Only used for result processing prototype purposes. To be removed.*/
-  NdbOperation& m_operation;
-  explicit NdbQueryOperationImpl(NdbQueryImpl& queryImpl, 
-				 const NdbQueryOperationDefImpl& def);
   explicit NdbQueryOperationImpl(NdbQueryImpl& queryImpl, 
-				 NdbOperation& operation);
+                                 const NdbQueryOperationDefImpl& def);
   ~NdbQueryOperationImpl(){
     if (m_id != NdbObjectIdMap::InvalidId) {
       m_queryImpl.getNdbTransaction()->getNdb()->theImpl

=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2009-07-02 14:21:25 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2009-07-07 19:49:58 +0000
@@ -85,7 +85,8 @@ NdbTransaction::NdbTransaction( Ndb* aNd
   theScanningOp(NULL),
   theBuddyConPtr(0xFFFFFFFF),
   theBlobFlag(false),
-  thePendingBlobOps(0)
+  thePendingBlobOps(0),
+  m_firstQuery(NULL)
 {
   theListState = NotInList;
   theError.code = 0;
@@ -631,6 +632,13 @@ NdbTransaction::executeAsynchPrepare(Ndb
    */
   if (theError.code != 4012)
     theError.code = 0;
+  NdbQueryImpl* query = m_firstQuery;
+  while(query!=NULL){
+    query->prepareSend();
+    query = query->getNext();
+  }
+  m_firstQuery = NULL;
+
   NdbScanOperation* tcOp = m_theFirstScanOperation;
   if (tcOp != 0){
     // Execute any cursor operations
@@ -2765,6 +2773,15 @@ NdbTransaction::createQuery(const NdbQue
 			    const void* const param[],
 			    NdbOperation::LockMode lock_mode)
 {
-  NdbQuery* query = NdbQuery::buildQuery(*this, *def);
-  return query;
+  NdbQueryImpl* query 
+    = NdbQueryImpl::buildQuery(*this, def->getImpl(), m_firstQuery);
+  if(query!=NULL)
+  {
+    m_firstQuery = query;
+    return &query->getInterface();
+  }
+  else
+  {
+    return NULL;
+  }
 }

=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp	2009-06-26 09:48:01 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp	2009-07-07 19:49:58 +0000
@@ -525,38 +525,39 @@ Ndb::handleReceivedSignal(NdbApiSignal* 
       if (tFirstDataPtr == 0) goto InvalidSignal;
 
       const bool isNdbOperation = 
-	void2rec(tFirstDataPtr)->checkMagicNumber();
+        void2rec(tFirstDataPtr)->checkMagicNumber();
       NdbQueryOperationImpl* const queryOpImpl 
-	= reinterpret_cast<NdbQueryOperationImpl*>(tFirstDataPtr);
+        = reinterpret_cast<NdbQueryOperationImpl*>(tFirstDataPtr);
 
       if (isNdbOperation) {
-	tOp = void2rec_op(tFirstDataPtr);
-	/* NB! NdbOperation::checkMagicNumber() returns 0 if it *is* 
-	* an NdbOperation.*/
-	assert(tOp->checkMagicNumber()==0); 
-	tCon = tOp->theNdbCon;
+        tOp = void2rec_op(tFirstDataPtr);
+        /* NB! NdbOperation::checkMagicNumber() returns 0 if it *is* 
+         * an NdbOperation.*/
+        assert(tOp->checkMagicNumber()==0); 
+        tCon = tOp->theNdbCon;
       } else if(queryOpImpl->checkMagicNumber()) {
-	tCon = queryOpImpl->getQuery().getNdbTransaction();
+        tCon = queryOpImpl->getQuery().getNdbTransaction();
       } else{ 
-	goto InvalidSignal;
+        goto InvalidSignal;
       }
       if (tCon != NULL) {
-	if (tCon->theSendStatus == NdbTransaction::sendTC_OP) {
-	  if(isNdbOperation){
-	    tReturnCode = tOp->receiveTCKEYREF(aSignal);
-	    if (tReturnCode != -1) {
-	      completedTransaction(tCon);
-	      return;
-	    }//if
-	  } else {
-	    if(queryOpImpl->execTCKEYREF() &&
-	       tCon->OpCompleteFailure(&queryOpImpl->getOperation()) != -1){
-	      completedTransaction(tCon);
-	      return;
-	    }//if 
-	  }//if
-	  break;
-	}//if
+        if (tCon->theSendStatus == NdbTransaction::sendTC_OP) {
+          if(isNdbOperation){
+            tReturnCode = tOp->receiveTCKEYREF(aSignal);
+            if (tReturnCode != -1) {
+              completedTransaction(tCon);
+              return;
+            }//if
+          } else {
+            if(queryOpImpl->execTCKEYREF() &&
+               tCon->OpCompleteFailure(queryOpImpl->getQuery()
+                                       .getNdbOperation()) != -1){
+              completedTransaction(tCon);
+              return;
+            }//if 
+          }//if
+          break;
+        }//if
       }//if (tCon != NULL)
       goto InvalidSignal;
       return;

=== modified file 'storage/ndb/test/tools/test_spj.cpp'
--- a/storage/ndb/test/tools/test_spj.cpp	2009-07-07 09:57:16 +0000
+++ b/storage/ndb/test/tools/test_spj.cpp	2009-07-07 19:49:58 +0000
@@ -311,6 +311,7 @@ int spjTest(int argc, char** argv){
 
   if (_scan == 0)
   {
+#ifdef UNUSED
     /**
        SELECT t1.*, t2.*
        FROM T t1 LEFT OUTER JOIN T t2 ON t2.a = t1.b0 AND t2.b = t1.a0
@@ -400,6 +401,7 @@ int spjTest(int argc, char** argv){
     for(int i=0; i<nNodes; i++){
       rSet[i]->print();
     }
+#endif
   }
   else if (_scan != 0)
   {
@@ -631,15 +633,16 @@ int testSerialize(int argc, char** argv)
   NdbTransaction* myTransaction= myNdb.startTransaction();
   if (myTransaction == NULL) APIERROR(myNdb.getNdbError());
 
-  NdbOperation* ndbOperation = myTransaction->getNdbOperation(tab);
-  ndbOperation->readTuple(NdbOperation::LM_Dirty);
-  // Set keys for root lookup.
-  ndbOperation->equal("a", 11);
-  ndbOperation->equal("b", 3);
+  //NdbOperation* ndbOperation = myTransaction->getNdbOperation(tab);
 
   // Instantiate NdbQuery for this transaction.
   NdbQuery* query = myTransaction->createQuery(queryDef, NULL);
 
+  // ndbOperation->readTuple(NdbOperation::LM_Dirty);
+  // Set keys for root lookup.
+  query->getImpl().getNdbOperation()->equal("a", 11);
+  query->getImpl().getNdbOperation()->equal("b", 3);
+
   /* Read all attributes from result tuples.*/
   const Uint32 nNodes = query->getNoOfOperations();
   const ResultSet** resultSet = new const ResultSet*[nNodes];
@@ -648,7 +651,7 @@ int testSerialize(int argc, char** argv)
   }
 
   /* Serialize query tree and parameters.*/
-  query->getImpl().prepareSend();
+  /*query->getImpl().prepareSend();
 
   Uint32* const tree = new Uint32[queryDef->getImpl().getSerialized().getSize()];
   for(Uint32 i = 0; i<queryDef->getImpl().getSerialized().getSize(); i++){
@@ -658,18 +661,18 @@ int testSerialize(int argc, char** argv)
   Uint32* const params = new Uint32[paramSize];
   for(Uint32 i = 0; i<paramSize; i++){
     params[i] = query->getImpl().getSerialized().get(i);
-  }
+    }*/
 
   /* Copy serialized data into ATTRINFO.*/
-  NdbScanFilterImpl::add(ndbOperation, tree, queryDef->getImpl().getSerialized().getSize());
-  NdbScanFilterImpl::add(ndbOperation, params, paramSize);
-  NdbScanFilterImpl::setIsLinkedFlag(ndbOperation);
+  /*NdbScanFilterImpl::add(ndbOperation, tree, queryDef->getImpl().getSerialized().getSize());
+    NdbScanFilterImpl::add(ndbOperation, params, paramSize);
+    NdbScanFilterImpl::setIsLinkedFlag(ndbOperation);*/
 
   // Add link to 
-  ndbOperation->setQueryImpl(&query->getImpl());
+  // ndbOperation->setQueryImpl(&query->getImpl());
   myTransaction->execute(NoCommit);
   // Print results.
-  for(int i=0; i<nNodes; i++){
+  for(Uint32 i=0; i<nNodes; i++){
     resultSet[i]->print();
   }
 


Attachment: [text/bzr-bundle] bzr/jan.wedvik@sun.com-20090707194958-rauh2hns16g9kcup.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj branch (jan.wedvik:2912) Jan Wedvik7 Jul