From: Date: October 3 2008 1:06am Subject: bzr commit into mysql-6.0-falcon-team branch (cpowers:2849) Bug#39706 List-Archive: http://lists.mysql.com/commits/55156 X-Bug: 39706 Message-Id: <20081002230619.96F6F1DB0669@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-08/mysql/ 2849 Christopher Powers 2008-10-02 Bug#39706, "Falcon recovery assertion in Cache::fetchPage for simple scenarios" Reapply fix from Bug#39692, "Falcon allocates SectorCache even if falcon_use_sectorcache is OFF" modified: storage/falcon/Cache.cpp per-file messages: storage/falcon/Cache.cpp Reapply fix from Bug#39692, "Falcon allocates SectorCache even if falcon_use_sectorcache is OFF" Allocate sector cache only if falcon_use_sector_cache is true. === modified file 'storage/falcon/Cache.cpp' --- a/storage/falcon/Cache.cpp 2008-10-02 22:15:11 +0000 +++ b/storage/falcon/Cache.cpp 2008-10-02 23:06:04 +0000 @@ -82,7 +82,9 @@ Cache::Cache(Database *db, int pageSz, i pageWriter = NULL; hashTable = new Bdb* [hashSz]; memset (hashTable, 0, sizeof (Bdb*) * hashSize); - sectorCache = new SectorCache(sectorCacheSize / SECTOR_BUFFER_SIZE, pageSize); + + if (falcon_use_sectorcache) + sectorCache = new SectorCache(sectorCacheSize / SECTOR_BUFFER_SIZE, pageSize); uint64 n = ((uint64) pageSize * numberBuffers + cacheHunkSize - 1) / cacheHunkSize; numberHunks = (int) n; @@ -153,7 +155,9 @@ Cache::~Cache() delete [] bdbs; delete [] ioThreads; delete flushBitmap; - delete sectorCache; + + if (falcon_use_sectorcache) + delete sectorCache; if (bufferHunks) {