#At file:///home/hakan/work/mysql/mysql-6.0-falcon-team-bug39692/
2832 Hakan Kuecuekyilmaz 2008-09-27
Fix for Bug#39692.
added:
mysql-test/suite/falcon/r/falcon_bug_39692.result
mysql-test/suite/falcon/t/falcon_bug_39692.test
modified:
storage/falcon/Cache.cpp
=== added file 'mysql-test/suite/falcon/r/falcon_bug_39692.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_39692.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_39692.result 2008-09-27 06:35:07 +0000
@@ -0,0 +1,8 @@
+*** Bug #39692 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a int);
+SELECT file FROM information_schema.falcon_system_memory_detail
+WHERE file = 'SectorCache.cpp';
+file
+DROP TABLE t1;
=== added file 'mysql-test/suite/falcon/t/falcon_bug_39692.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_39692.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_39692.test 2008-09-27 06:35:07 +0000
@@ -0,0 +1,35 @@
+--source include/have_falcon.inc
+
+#
+# Bug #39692: Falcon allocates SectorCache even if falcon_use_sectorcache is OFF
+#
+--echo *** Bug #39692 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a int);
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+SELECT file FROM information_schema.falcon_system_memory_detail
+ WHERE file = 'SectorCache.cpp';
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+# Check not applicable in this test.
+#SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
=== modified file 'storage/falcon/Cache.cpp'
--- a/storage/falcon/Cache.cpp 2008-09-09 20:57:57 +0000
+++ b/storage/falcon/Cache.cpp 2008-09-27 06:35:07 +0000
@@ -110,7 +110,8 @@ Cache::Cache(Database *db, int pageSz, i
syncHashTable[loop].setName(tmpName);
}
#endif /* DEBUG_SYNC_HASH_TABLE_SIZE */
- 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;
@@ -184,7 +185,8 @@ Cache::~Cache()
delete [] bdbs;
delete [] ioThreads;
delete flushBitmap;
- delete sectorCache;
+ if (falcon_use_sectorcache)
+ delete sectorCache;
if (bufferHunks)
{
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (hky:2832) Bug#39692 | Hakan Kuecuekyilmaz | 27 Sep |