From: Date: April 24 2006 1:45pm Subject: bk commit into 5.1 tree (tomas:1.2355) BUG#19247 List-Archive: http://lists.mysql.com/commits/5387 X-Bug: 19247 Message-Id: <20060424114510.296FC7FFAA@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of tomas. When tomas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2355 06/04/24 13:44:57 tomas@stripped +1 -0 Bug #19247 Huge memleak in replication of blobs storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 1.53 06/04/24 13:44:50 tomas@stripped +9 -2 Bug #19247 Huge memleak in replication of blobs # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/mysql-5.1-new --- 1.52/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-04-21 06:40:43 +02:00 +++ 1.53/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-04-24 13:44:50 +02:00 @@ -1911,12 +1911,16 @@ // loop twice where first loop only sets sizes int loop; + int result = 0; for (loop = 0; loop <= 1; loop++) { if (loop == 1) { if (alloc_mem(data, ptr) != 0) - DBUG_RETURN_EVENT(-1); + { + result = -1; + goto end; + } *data->sdata = *sdata; data->sdata->operation = tp->t3; } @@ -2030,10 +2034,13 @@ } } +end: // free old data NdbMem_Free((char*)olddata.memory); + assert(m_total_alloc >= olddata.sz); + m_total_alloc -= olddata.sz; - DBUG_RETURN_EVENT(0); + DBUG_RETURN_EVENT(result); } /*