List:Commits« Previous MessageNext Message »
From:Jan Wedvik Date:November 15 2010 1:40pm
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch
(jan.wedvik:3366)
View as plain text  
#At file:///net/atum17/export/home2/tmp/jw159207/mysql/repo/push-scan-scan/ based on revid:ole.john.aske@stripped

 3366 Jan Wedvik	2010-11-15
      This commit is a refactoring that removes the 
      NdbQueryOperationImpl::handleBatchComplete() method.

    modified:
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
      storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp
=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2010-11-10 12:02:26 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2010-11-15 13:40:09 +0000
@@ -752,6 +752,7 @@ NdbResultStream::handleBatchComplete()
   {
     const NdbQueryOperationImpl& child = m_operation.getChildOperation(childNo);
     NdbResultStream& childStream = child.getResultStream(m_rootFragNo);
+    childStream.handleBatchComplete();
 
     const bool isInnerJoin = child.getQueryOperationDef().getMatchType() != NdbQueryOptions::MatchAll;
     const bool allSubScansComplete = childStream.isAllSubScansComplete();
@@ -1931,7 +1932,8 @@ NdbQueryImpl::handleBatchComplete(Uint32
 
     if (getQueryDef().isScanQuery())
     {
-      root.handleBatchComplete(fragNo);  // Only required for scans
+      // Only required for scans
+      root.getResultStream(fragNo).handleBatchComplete();  
 
       // Only ordered scans has to wait until all pending completed
       resume = (m_pendingFrags==0) ||
@@ -3481,25 +3483,6 @@ NdbQueryOperationImpl::nextResult(bool f
 } //NdbQueryOperationImpl::nextResult()
 
 
-/** 
- * A batch of result rows has been completely received.
- * Update / reset required operation and resultstream status 
- * before we can start navigating and presenting the result rows
- * the the application interface.
- */
-void 
-NdbQueryOperationImpl::handleBatchComplete(Uint32 fragNo)
-{
-  for (Uint32 i = 0; i<getNoOfChildOperations(); i++)
-  {
-    NdbQueryOperationImpl& child = getChildOperation(i);
-    child.handleBatchComplete(fragNo);
-  }
-  m_resultStreams[fragNo]->handleBatchComplete();
-
-} // NdbQueryOperationImpl::handleBatchComplete
-  
-
 void 
 NdbQueryOperationImpl::fetchRow(NdbResultStream& resultStream)
 {

=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp	2010-11-09 14:55:01 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp	2010-11-15 13:40:09 +0000
@@ -703,11 +703,6 @@ private:
                                  const NdbQueryOperationDefImpl& def);
   ~NdbQueryOperationImpl();
 
-  /** A complete batch has been received for a given root fragment
-   *  Update whatever required before the appl. is allowed to navigate the result.
-   */ 
-  void handleBatchComplete(Uint32 rootFragNo);
-
   /** Copy NdbRecAttr and/or NdbRecord results from stream into appl. buffers */
   void fetchRow(NdbResultStream& resultStream);
 


Attachment: [text/bzr-bundle] bzr/jan.wedvik@sun.com-20101115134009-xl1txw33wu8voli4.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(jan.wedvik:3366) Jan Wedvik15 Nov