From 0cbb309b1a5f70a586f3bb5497beeef0604e1f2b Mon Sep 17 00:00:00 2001 From: "jonas@perch.ndb.mysql.com" <> Date: Fri, 27 Oct 2006 16:32:59 +0200 Subject: [PATCH] ndb - valgrind Still leakage, make sure all unlinked operations are put back so they will be release (on failing blob operations, when AO_IgnoreError) --- ndb/src/ndbapi/NdbConnection.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ndb/src/ndbapi/NdbConnection.cpp b/ndb/src/ndbapi/NdbConnection.cpp index e061740c9f6..d5fa8f77db2 100644 --- a/ndb/src/ndbapi/NdbConnection.cpp +++ b/ndb/src/ndbapi/NdbConnection.cpp @@ -379,7 +379,29 @@ NdbConnection::execute(ExecType aTypeOfExec, * operations, making postExecute impossible */ if (abortOption == AO_IgnoreError) + { + if (theCompletedFirstOp != NULL) + { + if (tCompletedFirstOp != NULL) + { + tCompletedLastOp->next(theCompletedFirstOp); + theCompletedFirstOp = tCompletedFirstOp; + } + } + else + { + theCompletedFirstOp = tCompletedFirstOp; + theCompletedLastOp = tCompletedLastOp; + } + if (tPrepOp != NULL && tRestOp != NULL) { + if (theFirstOpInList == NULL) + theFirstOpInList = tRestOp; + else + theLastOpInList->next(tRestOp); + theLastOpInList = tLastOp; + } DBUG_RETURN(-1); + } } #ifdef ndb_api_crash_on_complex_blob_abort