List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:October 3 2008 4:51am
Subject:bzr push into mysql-6.0-falcon-team branch (cpowers:2850)
View as plain text  
 2850 Christopher Powers	2008-10-02 [merge]
      (no message)
modified:
  storage/falcon/Cache.cpp
  storage/falcon/Cache.h

=== 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)
 		{

=== modified file 'storage/falcon/DeferredIndex.cpp'
--- a/storage/falcon/DeferredIndex.cpp	2008-09-10 19:51:03 +0000
+++ b/storage/falcon/DeferredIndex.cpp	2008-10-02 23:20:47 +0000
@@ -884,11 +884,7 @@ void DeferredIndex::addRef()
 
 void DeferredIndex::releaseRef()
 {
-	ASSERT(useCount > 0);
-	
-	INTERLOCKED_DECREMENT(useCount);
-
-	if (useCount == 0)
+	if (INTERLOCKED_DECREMENT(useCount) == 0)
 		delete this;
 }
 

=== modified file 'storage/falcon/Transaction.cpp'
--- a/storage/falcon/Transaction.cpp	2008-09-10 19:51:03 +0000
+++ b/storage/falcon/Transaction.cpp	2008-10-02 23:51:36 +0000
@@ -1076,14 +1076,10 @@ void Transaction::addRef()
 	INTERLOCKED_INCREMENT(useCount);
 }
 
-int Transaction::release()
+void Transaction::release()
 {
-	int count = INTERLOCKED_DECREMENT(useCount);
-
-	if (count == 0)
+	if (INTERLOCKED_DECREMENT(useCount) == 0)
 		delete this;
-
-	return count;
 }
 
 int Transaction::createSavepoint()
@@ -1317,7 +1313,7 @@ void Transaction::add(DeferredIndex* def
 	Sync sync(&syncDeferredIndexes, "Transaction::add");
 	sync.lock(Exclusive);
 
-	deferredIndex->addRef();
+//	deferredIndex->addRef(); // temporarily disabled for Bug#39711
 	deferredIndex->nextInTransaction = deferredIndexes;
 	deferredIndexes = deferredIndex;
 	deferredIndexCount++;

=== modified file 'storage/falcon/Transaction.h'
--- a/storage/falcon/Transaction.h	2008-09-10 04:02:07 +0000
+++ b/storage/falcon/Transaction.h	2008-10-02 23:20:47 +0000
@@ -99,7 +99,7 @@ public:
 	void		prepare(int xidLength, const UCHAR *xid);
 	void		rollback();
 	void		commit();
-	int			release();
+	void		release();
 	void		addRef();
 	void		waitForTransaction();
 	bool		waitForTransaction (TransId transId);

Thread
bzr push into mysql-6.0-falcon-team branch (cpowers:2850) Christopher Powers3 Oct