From: Date: September 10 2008 6:37am Subject: bzr commit into mysql-6.0-falcon branch (cpowers:2816) Bug#39350 List-Archive: http://lists.mysql.com/commits/53655 X-Bug: 39350 Message-Id: <20080910043800.034C71DB0726@xeno.mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///home/cpowers/work/dev/dev-07/mysql/ 2816 Christopher Powers 2008-09-09 Bug#39350 Falcon: Releasing deferred indexes causes crash Minor changes per code review modified: storage/falcon/Transaction.cpp per-file messages: storage/falcon/Transaction.cpp Remove check for null transaction in Transaction::releaseDeferredIndexes() === modified file 'storage/falcon/Transaction.cpp' --- a/storage/falcon/Transaction.cpp 2008-09-10 04:02:07 +0000 +++ b/storage/falcon/Transaction.cpp 2008-09-10 04:37:47 +0000 @@ -1501,14 +1501,8 @@ void Transaction::releaseDeferredIndexes for (DeferredIndex *deferredIndex; (deferredIndex = deferredIndexes);) { + ASSERT(deferredIndex->transaction == this); deferredIndexes = deferredIndex->nextInTransaction; - - if (deferredIndex->transaction) - { - ASSERT(deferredIndex->transaction == this); - deferredIndex->detachTransaction(); - } - deferredIndex->releaseRef(); deferredIndexCount--; } @@ -1524,8 +1518,7 @@ void Transaction::releaseDeferredIndexes if (deferredIndex->index && (deferredIndex->index->table == table)) { *ptr = deferredIndex->nextInTransaction; - if (deferredIndex->transaction) - deferredIndex->detachTransaction(); + deferredIndex->detachTransaction(); deferredIndex->releaseRef(); --deferredIndexCount; }