From: Ole John Aske Date: November 10 2010 12:03pm Subject: bzr push into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (ole.john.aske:3357 to 3358) List-Archive: http://lists.mysql.com/commits/123399 Message-Id: <20101110120304.AAFC8222@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3358 Ole John Aske 2010-11-10 spj-svs: NdbQueryImpl::handleBatchComplete() should not return 'resume==true' for an ordered scan until all pending fragments has completed. This will reduce sporious wakeup of application threads for ordered scans. modified: storage/ndb/src/ndbapi/NdbQueryOperation.cpp 3357 Jonas Oreland 2010-11-10 ndb spj svs - fix result (explain) missmatch... modified: mysql-test/suite/ndb/r/ndb_condition_pushdown.result === modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp' --- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp 2010-11-10 08:01:00 +0000 +++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp 2010-11-10 12:02:26 +0000 @@ -1932,7 +1932,10 @@ NdbQueryImpl::handleBatchComplete(Uint32 if (getQueryDef().isScanQuery()) { root.handleBatchComplete(fragNo); // Only required for scans - resume = (m_pendingFrags==0) || true; + + // Only ordered scans has to wait until all pending completed + resume = (m_pendingFrags==0) || + (root.m_ordering==NdbQueryOptions::ScanOrdering_unordered); } else { No bundle (reason: useless for push emails).