Loading ndb/include/ndbapi/NdbScanOperation.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public: /** * Close scan */ void close(bool forceSend = false); void close(bool forceSend = false, bool releaseOp = false); /** * Update current tuple Loading ndb/src/ndbapi/NdbScanOperation.cpp +21 −7 Original line number Diff line number Diff line Loading @@ -633,8 +633,14 @@ NdbScanOperation::doSend(int ProcessorId) return 0; } void NdbScanOperation::close(bool forceSend) void NdbScanOperation::close(bool forceSend, bool releaseOp) { DBUG_ENTER("NdbScanOperation::close"); DBUG_PRINT("enter", ("this=%x tcon=%x con=%x force=%d release=%d", (UintPtr)this, (UintPtr)m_transConnection, (UintPtr)theNdbCon, forceSend, releaseOp)); if(m_transConnection){ if(DEBUG_NEXT_RESULT) ndbout_c("close() theError.code = %d " Loading @@ -650,13 +656,21 @@ void NdbScanOperation::close(bool forceSend) Guard guard(tp->theMutexPtr); close_impl(tp, forceSend); } while(0); theNdbCon->theScanningOp = 0; theNdb->closeTransaction(theNdbCon); } theNdbCon = 0; NdbConnection* tCon = theNdbCon; NdbConnection* tTransCon = m_transConnection; theNdbCon = NULL; m_transConnection = NULL; if (releaseOp && tTransCon) { NdbIndexScanOperation* tOp = (NdbIndexScanOperation*)this; tTransCon->releaseExecutedScanOperation(tOp); } tCon->theScanningOp = 0; theNdb->closeTransaction(tCon); DBUG_VOID_RETURN; } void Loading ndb/src/ndbapi/NdbTransaction.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -954,9 +954,9 @@ void releaseExecutedScanOperation(); Remark: Release scan op when hupp'ed trans closed (save memory) ******************************************************************************/ void NdbConnection::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) NdbTransaction::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) { DBUG_ENTER("NdbConnection::releaseExecutedScanOperation"); DBUG_ENTER("NdbTransaction::releaseExecutedScanOperation"); DBUG_PRINT("enter", ("this=0x%x op=0x%x", (UintPtr)this, (UintPtr)cursorOp)) // here is one reason to make op lists doubly linked Loading @@ -977,7 +977,7 @@ NdbConnection::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) } } DBUG_VOID_RETURN; }//NdbConnection::releaseExecutedScanOperation() }//NdbTransaction::releaseExecutedScanOperation() /***************************************************************************** NdbOperation* getNdbOperation(const char* aTableName); Loading ndb/src/ndbapi/Ndblist.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -550,10 +550,21 @@ Remark: Add a NdbScanOperation object into the signal idlelist. void Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation) { DBUG_ENTER("Ndb::releaseScanOperation"); DBUG_PRINT("enter", ("op=%x", (UintPtr)aScanOperation)); #ifdef ndb_release_check_dup { NdbIndexScanOperation* tOp = theScanOpIdleList; while (tOp != NULL) { assert(tOp != aScanOperation); tOp = (NdbIndexScanOperation*)tOp->theNext; } } #endif aScanOperation->next(theScanOpIdleList); aScanOperation->theNdbCon = NULL; aScanOperation->theMagicNumber = 0xFE11D2; theScanOpIdleList = aScanOperation; DBUG_VOID_RETURN; } /*************************************************************************** Loading sql/ha_ndbcluster.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2685,7 +2685,7 @@ int ha_ndbcluster::close_scan() m_ops_pending= 0; } cursor->close(m_force_send); cursor->close(m_force_send, true); m_active_cursor= m_multi_cursor= NULL; DBUG_RETURN(0); } Loading Loading @@ -5694,7 +5694,7 @@ ha_ndbcluster::read_multi_range_next(KEY_MULTI_RANGE ** multi_range_found_p) close_scan: if (res == 1) { m_multi_cursor->close(); m_multi_cursor->close(false, true); m_active_cursor= m_multi_cursor= 0; DBUG_MULTI_RANGE(8); continue; Loading Loading
ndb/include/ndbapi/NdbScanOperation.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public: /** * Close scan */ void close(bool forceSend = false); void close(bool forceSend = false, bool releaseOp = false); /** * Update current tuple Loading
ndb/src/ndbapi/NdbScanOperation.cpp +21 −7 Original line number Diff line number Diff line Loading @@ -633,8 +633,14 @@ NdbScanOperation::doSend(int ProcessorId) return 0; } void NdbScanOperation::close(bool forceSend) void NdbScanOperation::close(bool forceSend, bool releaseOp) { DBUG_ENTER("NdbScanOperation::close"); DBUG_PRINT("enter", ("this=%x tcon=%x con=%x force=%d release=%d", (UintPtr)this, (UintPtr)m_transConnection, (UintPtr)theNdbCon, forceSend, releaseOp)); if(m_transConnection){ if(DEBUG_NEXT_RESULT) ndbout_c("close() theError.code = %d " Loading @@ -650,13 +656,21 @@ void NdbScanOperation::close(bool forceSend) Guard guard(tp->theMutexPtr); close_impl(tp, forceSend); } while(0); theNdbCon->theScanningOp = 0; theNdb->closeTransaction(theNdbCon); } theNdbCon = 0; NdbConnection* tCon = theNdbCon; NdbConnection* tTransCon = m_transConnection; theNdbCon = NULL; m_transConnection = NULL; if (releaseOp && tTransCon) { NdbIndexScanOperation* tOp = (NdbIndexScanOperation*)this; tTransCon->releaseExecutedScanOperation(tOp); } tCon->theScanningOp = 0; theNdb->closeTransaction(tCon); DBUG_VOID_RETURN; } void Loading
ndb/src/ndbapi/NdbTransaction.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -954,9 +954,9 @@ void releaseExecutedScanOperation(); Remark: Release scan op when hupp'ed trans closed (save memory) ******************************************************************************/ void NdbConnection::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) NdbTransaction::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) { DBUG_ENTER("NdbConnection::releaseExecutedScanOperation"); DBUG_ENTER("NdbTransaction::releaseExecutedScanOperation"); DBUG_PRINT("enter", ("this=0x%x op=0x%x", (UintPtr)this, (UintPtr)cursorOp)) // here is one reason to make op lists doubly linked Loading @@ -977,7 +977,7 @@ NdbConnection::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) } } DBUG_VOID_RETURN; }//NdbConnection::releaseExecutedScanOperation() }//NdbTransaction::releaseExecutedScanOperation() /***************************************************************************** NdbOperation* getNdbOperation(const char* aTableName); Loading
ndb/src/ndbapi/Ndblist.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -550,10 +550,21 @@ Remark: Add a NdbScanOperation object into the signal idlelist. void Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation) { DBUG_ENTER("Ndb::releaseScanOperation"); DBUG_PRINT("enter", ("op=%x", (UintPtr)aScanOperation)); #ifdef ndb_release_check_dup { NdbIndexScanOperation* tOp = theScanOpIdleList; while (tOp != NULL) { assert(tOp != aScanOperation); tOp = (NdbIndexScanOperation*)tOp->theNext; } } #endif aScanOperation->next(theScanOpIdleList); aScanOperation->theNdbCon = NULL; aScanOperation->theMagicNumber = 0xFE11D2; theScanOpIdleList = aScanOperation; DBUG_VOID_RETURN; } /*************************************************************************** Loading
sql/ha_ndbcluster.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2685,7 +2685,7 @@ int ha_ndbcluster::close_scan() m_ops_pending= 0; } cursor->close(m_force_send); cursor->close(m_force_send, true); m_active_cursor= m_multi_cursor= NULL; DBUG_RETURN(0); } Loading Loading @@ -5694,7 +5694,7 @@ ha_ndbcluster::read_multi_range_next(KEY_MULTI_RANGE ** multi_range_found_p) close_scan: if (res == 1) { m_multi_cursor->close(); m_multi_cursor->close(false, true); m_active_cursor= m_multi_cursor= 0; DBUG_MULTI_RANGE(8); continue; Loading