diff options
author | unknown <serg@serg.mylan> | 2005-04-06 21:19:20 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-04-06 21:19:20 +0200 |
commit | 3960c84f1202cf2e47427df1ca869a054a67f829 (patch) | |
tree | d7dfbdbb37dfe91906c38499758105cb11079399 /ndb | |
parent | 6f23625d4e70dd2977afcbbd7d12e5f09fe5684a (diff) | |
parent | cde615c9cbff404b6a6c82a1ab7a6bcb8742b88e (diff) | |
download | mariadb-git-3960c84f1202cf2e47427df1ca869a054a67f829.tar.gz |
manually merged
Gluh's SESSION/GLOBAL for @variables fix in sql_yacc.yy and
Bar's well_formed_len() changes in ndb code
did not make it and should be re-applied manually
BitKeeper/etc/logging_ok:
auto-union
include/m_ctype.h:
Auto merged
innobase/btr/btr0pcur.c:
Auto merged
innobase/include/btr0pcur.h:
Auto merged
innobase/include/os0file.h:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/user_var.test:
Auto merged
ndb/include/ndbapi/NdbTransaction.hpp:
Auto merged
ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
ndb/tools/desc.cpp:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-simple.c:
Auto merged
strings/ctype-sjis.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/ctype-ujis.c:
Auto merged
BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d:
ul
ndb/include/ndbapi/NdbScanOperation.hpp:
ul
ndb/src/ndbapi/NdbIndexOperation.cpp:
ul
ndb/src/ndbapi/NdbOperationDefine.cpp:
ul
ndb/src/ndbapi/NdbOperationSearch.cpp:
ul
ndb/src/ndbapi/NdbScanOperation.cpp:
ul
sql/field.cc:
manually merged, because bk messed it up
sql/sql_yacc.yy:
merged
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/ndbapi/NdbTransaction.hpp | 1 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbTransaction.cpp | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/ndb/include/ndbapi/NdbTransaction.hpp b/ndb/include/ndbapi/NdbTransaction.hpp index 50e4e766803..2e102b104d8 100644 --- a/ndb/include/ndbapi/NdbTransaction.hpp +++ b/ndb/include/ndbapi/NdbTransaction.hpp @@ -658,6 +658,7 @@ private: // Release all cursor operations in connection void releaseOps(NdbOperation*); void releaseScanOperations(NdbIndexScanOperation*); + void releaseExecutedScanOperation(NdbIndexScanOperation*); // Set the transaction identity of the transaction void setTransactionId(Uint64 aTransactionId); diff --git a/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp index 67581e4a0f8..c2ded3560fc 100644 --- a/ndb/src/ndbapi/NdbTransaction.cpp +++ b/ndb/src/ndbapi/NdbTransaction.cpp @@ -949,6 +949,37 @@ NdbTransaction::releaseScanOperations(NdbIndexScanOperation* cursorOp) }//NdbTransaction::releaseScanOperations() /***************************************************************************** +void releaseExecutedScanOperation(); + +Remark: Release scan op when hupp'ed trans closed (save memory) +******************************************************************************/ +void +NdbConnection::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp) +{ + DBUG_ENTER("NdbConnection::releaseExecutedScanOperation"); + DBUG_PRINT("enter", ("this=0x%x op=0x%x", (UintPtr)this, (UintPtr)cursorOp)) + + // here is one reason to make op lists doubly linked + if (m_firstExecutedScanOp == cursorOp) { + m_firstExecutedScanOp = (NdbIndexScanOperation*)cursorOp->theNext; + cursorOp->release(); + theNdb->releaseScanOperation(cursorOp); + } else if (m_firstExecutedScanOp != NULL) { + NdbIndexScanOperation* tOp = m_firstExecutedScanOp; + while (tOp->theNext != NULL) { + if (tOp->theNext == cursorOp) { + tOp->theNext = cursorOp->theNext; + cursorOp->release(); + theNdb->releaseScanOperation(cursorOp); + break; + } + tOp = (NdbIndexScanOperation*)tOp->theNext; + } + } + DBUG_VOID_RETURN; +}//NdbConnection::releaseExecutedScanOperation() + +/***************************************************************************** NdbOperation* getNdbOperation(const char* aTableName); Return Value Return a pointer to a NdbOperation object if getNdbOperation |