List:Commits« Previous MessageNext Message »
From:Kevin Lewis Date:September 29 2009 1:12pm
Subject:bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2804)
View as plain text  
#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/ based on revid:kevin.lewis@stripped

 2804 Kevin Lewis	2009-09-29 [merge]
      merge

    modified:
      storage/falcon/Dbb.cpp
      storage/falcon/Gopher.cpp
      storage/falcon/Index2Page.cpp
      storage/falcon/Index2RootPage.cpp
      storage/falcon/IndexPage.cpp
      storage/falcon/IndexRootPage.cpp
      storage/falcon/InversionPage.cpp
      storage/falcon/PageInventoryPage.cpp
      storage/falcon/Section.cpp
      storage/falcon/TableSpaceManager.cpp
      storage/falcon/Transaction.cpp
=== modified file 'storage/falcon/Dbb.cpp'
--- a/storage/falcon/Dbb.cpp	2009-09-03 04:45:15 +0000
+++ b/storage/falcon/Dbb.cpp	2009-09-25 18:37:25 +0000
@@ -275,7 +275,7 @@ int32 Dbb::createSection(TransId transId
 {
 	int32 sectionId = Section::createSection (this, transId);
 
-	if (serialLog && !serialLog->recovering)
+	if (serialLog && !serialLog->recovering && !noLog)
 		serialLog->logControl->createSection.append(this, transId, sectionId);
 	
 	return sectionId;
@@ -316,7 +316,7 @@ void Dbb::reInsertStub(int32 sectionId, 
 
 void Dbb::logRecord(int32 sectionId, int32 recordId, Stream *stream, Transaction *transaction)
 {
-	if (serialLog)
+	if (serialLog && !serialLog->recovering && !noLog)
 		{
 		if (stream)
 			serialLog->logControl->dataUpdate.append(this, transaction, sectionId, recordId, stream);
@@ -329,7 +329,8 @@ void Dbb::logRecord(int32 sectionId, int
 
 void Dbb::updateBlob(Section *blobSection, int recordNumber, Stream* stream, TransactionState* transState)
 {
-	if (!serialLog->recovering && stream && stream->totalLength < (int) falcon_large_blob_threshold)
+	if (serialLog && !serialLog->recovering && !noLog &&
+		stream && stream->totalLength < (int) falcon_large_blob_threshold)
 		{
 		serialLog->logControl->smallBlob.append(this, blobSection->sectionId, transState->transactionId, recordNumber, stream);
 		updateRecord(blobSection, recordNumber, stream, transState, false);
@@ -423,7 +424,7 @@ bool Dbb::addIndexEntry(int32 indexId, i
 #endif
 
 	/***
-	if (!recovering && serialLog)
+	if (serialLog && !serialLog->recoverying && !noLog)
 		serialLog->logControl->indexAdd.append(indexId, key, recordNumber, transId);
 	***/
 	
@@ -512,7 +513,7 @@ void Dbb::setODSMinorVersion(int minor)
 
 void Dbb::deleteIndex(int32 indexId, int indexVersion, TransId transId)
 {
-	if (serialLog)
+	if (serialLog && !serialLog->recovering && !noLog)
 		serialLog->logControl->deleteIndex.append(this, transId, indexId, indexVersion);
 	else
 		IndexRootPage::deleteIndex(this, indexId, transId);
@@ -547,7 +548,7 @@ void Dbb::freePage(Bdb * bdb, TransId tr
 	cache->markClean(bdb);
 	bdb->release(REL_HISTORY);
 
-	if (serialLog && !serialLog->recovering)
+	if (serialLog && !serialLog->recovering && !noLog)
 		serialLog->logControl->freePage.append(this, pageNumber);
 
 	PageInventoryPage::freePage(this, pageNumber, transId);
@@ -563,7 +564,7 @@ void Dbb::deleteSection(int32 sectionId,
 {
 	int slot = sectionId % SECTION_HASH_SIZE;
 	
-	if (serialLog && !serialLog->recovering)
+	if (serialLog && !serialLog->recovering && !noLog)
 		serialLog->logControl->dropTable.append(this, transId, sectionId);
 	else
 		Section::deleteSection (this, sectionId, transId);
@@ -644,7 +645,8 @@ bool Dbb::deleteIndexEntry(int32 indexId
 	bool result;
 
 	result = IndexRootPage::deleteIndexEntry (this, indexId, key, recordNumber, transId);
-	if (serialLog && !serialLog->recovering)
+
+	if (serialLog && !serialLog->recovering && !noLog)
 		serialLog->logControl->indexDelete.append(this, indexId, indexVersion, key, recordNumber, transId);
 
 	return result;
@@ -742,7 +744,7 @@ Bdb* Dbb::getSequencePage(int sequenceId
 					sectionPage->pages[sequenceSlot] = bdb->pageNumber;
 					sectionBdb->release(REL_HISTORY);
 					
-					if (!serialLog->recovering)
+					if (serialLog && !serialLog->recovering && !noLog)
 						{
 						serialLog->logControl->sequencePage.append(this, sequencePageSequence, bdb->pageNumber);
 						int32 pageNumber = bdb->pageNumber;
@@ -808,7 +810,7 @@ int64 Dbb::updateSequence(int sequenceId
 	
 	bdb->release(REL_HISTORY);
 	
-	if (serialLog && !serialLog->recovering && delta)
+	if (serialLog && !serialLog->recovering && !noLog && delta)
 		serialLog->logControl->sequence.append(sequenceId, value);
 	
 	return value;
@@ -1133,7 +1135,7 @@ void Dbb::redoDataPage(int sectionId, in
 
 int Dbb::logUpdatedRecords(Transaction* transaction, RecordVersion* records, int chill)
 {
-	if (records)
+	if (records && serialLog && !serialLog->recovering && !noLog)
 		return serialLog->logControl->updateRecords.append(transaction, records, chill);
 
 	return 0;
@@ -1141,7 +1143,8 @@ int Dbb::logUpdatedRecords(Transaction* 
 
 void Dbb::logIndexUpdates(DeferredIndex* deferredIndex)
 {
-	serialLog->logControl->updateIndex.append(deferredIndex);
+	if (serialLog && !serialLog->recovering && !noLog)
+		serialLog->logControl->updateIndex.append(deferredIndex);
 }
 
 bool Dbb::sectionInUse(int sectionId)

=== modified file 'storage/falcon/Gopher.cpp'
--- a/storage/falcon/Gopher.cpp	2008-07-15 18:57:27 +0000
+++ b/storage/falcon/Gopher.cpp	2009-09-25 18:37:25 +0000
@@ -73,7 +73,8 @@ void Gopher::gopherThread(void)
 		syncPending.lock(Exclusive);
 		releaseConcurrency(&syncPending, transaction->allowConcurrentGophers);
 
-		log->inactions.append(transaction);
+		if (!log->recovering)
+			log->inactions.append(transaction);
 		
 		if (log->pending.count > log->maxTransactions && !log->blocking)
 			log->blockUpdates();

=== modified file 'storage/falcon/Index2Page.cpp'
--- a/storage/falcon/Index2Page.cpp	2009-03-02 18:36:32 +0000
+++ b/storage/falcon/Index2Page.cpp	2009-09-25 18:37:25 +0000
@@ -995,9 +995,12 @@ void Index2Page::logIndexPage(Bdb *bdb, 
 
 	ASSERT(bdb->useCount > 0);
 	Index2Page *indexPage = (Index2Page*) bdb->buffer;
-	dbb->serialLog->logControl->indexPage.append(dbb, transId, INDEX_VERSION_0, bdb->pageNumber, indexPage->level, 
-												 indexPage->nextPage,  indexPage->length - OFFSET (Index2Page*, nodes), 
-												 (const UCHAR*) indexPage->nodes);
+
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
+		dbb->serialLog->logControl->indexPage.append(dbb, transId, INDEX_VERSION_0, bdb->pageNumber, 
+													indexPage->level, indexPage->nextPage,  
+													indexPage->length - OFFSET (Index2Page*, nodes), 
+													(const UCHAR*) indexPage->nodes);
 }
 
 Btn* Index2Page::findInsertionPoint(int level, IndexKey* indexKey, int32 recordNumber, IndexKey* expandedKey, Btn* nodes, Btn* bucketEnd)

=== modified file 'storage/falcon/Index2RootPage.cpp'
--- a/storage/falcon/Index2RootPage.cpp	2009-04-08 15:36:49 +0000
+++ b/storage/falcon/Index2RootPage.cpp	2009-09-25 18:37:25 +0000
@@ -835,7 +835,7 @@ void Index2RootPage::setIndexRoot(Dbb* d
 	SectionPage *sections = (SectionPage*) bdb->buffer;
 	sections->pages[slot] = pageNumber;
 	
-	if (!dbb->serialLog->recovering && !dbb->noLog)
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 		dbb->serialLog->logControl->sectionPage.append(dbb, transId, bdb->pageNumber, pageNumber, slot, INDEX_ROOT, sequence, 0);
 
 	bdb->release(REL_HISTORY);

=== modified file 'storage/falcon/IndexPage.cpp'
--- a/storage/falcon/IndexPage.cpp	2009-08-27 16:23:50 +0000
+++ b/storage/falcon/IndexPage.cpp	2009-09-25 18:37:25 +0000
@@ -1198,7 +1198,9 @@ void IndexPage::logIndexPage(Bdb *bdb, T
 	ASSERT(bdb->lockType == Exclusive);
 	ASSERT(bdb->isDirty);
 	IndexPage *indexPage = (IndexPage*) bdb->buffer;
-	dbb->serialLog->logControl->indexPage.append(
+
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
+		dbb->serialLog->logControl->indexPage.append(
 				dbb, 
 				transId,
 				index? index->indexVersion : INDEX_CURRENT_VERSION,

=== modified file 'storage/falcon/IndexRootPage.cpp'
--- a/storage/falcon/IndexRootPage.cpp	2009-08-25 08:39:00 +0000
+++ b/storage/falcon/IndexRootPage.cpp	2009-09-25 18:37:25 +0000
@@ -944,8 +944,11 @@ void IndexRootPage::createIndexRoot(Dbb*
 		{
 		// This is not recovery , allocate a new page and log it.
 		bdb = dbb->allocPage(PAGE_btree, transId);
-		dbb->serialLog->logControl->createIndex.append(dbb, transId, id, INDEX_CURRENT_VERSION, 
-					bdb->pageNumber);
+
+		if (!dbb->noLog)
+			dbb->serialLog->logControl->createIndex.append(dbb, transId, id, 
+															INDEX_CURRENT_VERSION, 
+															bdb->pageNumber);
 		}
 	BDB_HISTORY(bdb);
 

=== modified file 'storage/falcon/InversionPage.cpp'
--- a/storage/falcon/InversionPage.cpp	2008-06-17 17:41:54 +0000
+++ b/storage/falcon/InversionPage.cpp	2009-09-25 18:37:25 +0000
@@ -245,7 +245,10 @@ Bdb* InversionPage::splitInversionPage(D
 		}
 
 	nextPage = splitBdb->pageNumber;
-	//dbb->serialLog->logControl->inversionPage.append(splitBdb->pageNumber, parentPage, split->priorPage, nextPage);
+
+	//(if dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
+	//	dbb->serialLog->logControl->inversionPage.append(splitBdb->pageNumber, parentPage, 
+	//														split->priorPage, nextPage);
 
 	/* Copy midpoint node to new page.  Compute length, then
 	   copy tail of page to new page */
@@ -602,11 +605,13 @@ void InversionPage::logPage(Bdb *bdb)
 {
 	Dbb *dbb = bdb->dbb;
 
-	if (dbb->serialLog->recovering)
+	if (dbb->serialLog && dbb->serialLog->recovering)
 		return;
 
 	InversionPage *page = (InversionPage*) bdb->buffer;
-	dbb->serialLog->logControl->inversionPage.append(dbb, bdb->pageNumber,
+
+	if (dbb->serialLog && !dbb->noLog)
+		dbb->serialLog->logControl->inversionPage.append(dbb, bdb->pageNumber,
 												 page->parentPage, page->priorPage, page->nextPage,  
 												 page->length - OFFSET (IndexPage*, nodes), 
 												 (const UCHAR*) page->nodes);

=== modified file 'storage/falcon/PageInventoryPage.cpp'
--- a/storage/falcon/PageInventoryPage.cpp	2009-03-02 18:36:32 +0000
+++ b/storage/falcon/PageInventoryPage.cpp	2009-09-25 18:37:25 +0000
@@ -78,7 +78,7 @@ Bdb* PageInventoryPage::createInventoryP
 	for (int n = 0; n < dbb->pipSlots; ++n)
 		page->freePages [n] = -1;
 
-	if (dbb->database->serialLog && !dbb->database->serialLog->recovering
+	if (dbb->database->serialLog && !dbb->database->serialLog->recovering && !dbb->noLog
 		&& (pageNumber != PIP_PAGE))
 		dbb->database->serialLog->logControl->inventoryPage.append(dbb, pageNumber);
 

=== modified file 'storage/falcon/Section.cpp'
--- a/storage/falcon/Section.cpp	2009-04-21 10:43:08 +0000
+++ b/storage/falcon/Section.cpp	2009-09-25 18:37:25 +0000
@@ -73,7 +73,7 @@ static Bdb* allocSectionPage(Dbb *dbb, i
 {
 	Bdb *newBdb = dbb->allocPage(PAGE_sections, transId);
 
-	if (!dbb->serialLog->recovering && !dbb->noLog)
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 		dbb->serialLog->logControl->sectionPage.append(dbb, transId, parentPage, newBdb->pageNumber, slot, sectionId, sequence, level);
 	return newBdb;
 }
@@ -231,7 +231,7 @@ Bdb* Section::getSectionPage(Dbb *dbb, i
 			Bdb *newBdb = dbb->allocPage(PAGE_sections, transId);
 			BDB_HISTORY(newBdb);
 			
-			if (!dbb->serialLog->recovering && !dbb->noLog)
+			if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 				dbb->serialLog->logControl->sectionPromotion.append(dbb, page->section, bdb->pageNumber, dbb->pageSize, 
 																	(const UCHAR*) page, newBdb->pageNumber);
 
@@ -384,7 +384,7 @@ int32 Section::insertStub(TransId transI
 				page->section = pages->section;
 				page->sequence = line / linesPerPage;
 				
-				if (!dbb->serialLog->recovering && !dbb->noLog)
+				if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 					dbb->serialLog->logControl->recordLocator.append(dbb, transId, sectionId, page->sequence, bdb->pageNumber);
 				}
 
@@ -545,7 +545,7 @@ void Section::updateRecord(int32 recordN
 
 		if (!stream)
 			{
-			if (earlyWrite)
+			if (earlyWrite && dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 				dbb->serialLog->logControl->blobDelete.append(dbb, bdb->pageNumber, line, index->page, index->line);
 			
 			if (line < locatorPage->maxLine)
@@ -644,7 +644,7 @@ int Section::deleteLine(Bdb * bdb, int l
 			return spaceAvailable;
 			}
 	
-	if (!dbb->serialLog->recovering && !dbb->noLog)
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 		dbb->serialLog->logControl->sectionLine.append(dbb, sectionPageNumber, bdb->pageNumber);
 				
 	dbb->freePage(bdb, transId);
@@ -689,7 +689,7 @@ void Section::storeRecord(RecordLocatorP
 				recordLocatorPage->setIndexSlot(indexSlot, temp.page, temp.line, spaceAvailable);
 				VALIDATE_SPACE_SLOTS(recordLocatorPage, dbb->linesPerPage);
 
-				if (!dbb->serialLog->recovering && !dbb->noLog)
+				if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 					{
 					if (earlyWrite)
 						{
@@ -728,7 +728,7 @@ void Section::storeRecord(RecordLocatorP
 
 	recordLocatorPage->setIndexSlot(indexSlot, temp.page, temp.line, spaceAvailable);
 
-	if (!dbb->serialLog->recovering && !dbb->noLog)
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 		{
 		//The earlyWrite flag indicates that a DataPage is actually a
 		//large blob page.  It's allocation should not be recorded in
@@ -784,7 +784,7 @@ int Section::storeTail(Stream * stream, 
 	
 
 	SerialLog *log = dbb->serialLog;
-	if (log)
+	if (log && !dbb->noLog)
 		{
 		if (log->recovering)
 			log->setOverflowPageValid(overflowPageNumber, dbb->tableSpaceSectionId);
@@ -959,7 +959,7 @@ void Section::deleteSection(Dbb * dbb, i
 	sections->pages [slot] = 0;
 	dbb->nextSection = MIN(sectionId, dbb->nextSection);
 
-	if (!dbb->serialLog->recovering && !dbb->noLog)
+	if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 		dbb->serialLog->logControl->sectionPage.append(dbb, transId, sectionsBdb->pageNumber, 0, slot, sections->section, sections->sequence, sections->level);
 
 	sectionsBdb->release(REL_HISTORY);
@@ -980,7 +980,7 @@ void Section::deleteSectionLevel(Dbb * d
 		{
 		for (int n = 0; n < dbb->pagesPerSection; ++n)
 			{
-			if (!dbb->serialLog->recovering && !dbb->noLog)
+			if (dbb->serialLog && !dbb->serialLog->recovering && !dbb->noLog)
 				dbb->serialLog->logControl->sectionPage.append(dbb, transId, pageNumber, 0, n, page->section, page->sequence, page->level);
 				
 			if (page->pages [n])

=== modified file 'storage/falcon/TableSpaceManager.cpp'
--- a/storage/falcon/TableSpaceManager.cpp	2009-02-26 20:04:31 +0000
+++ b/storage/falcon/TableSpaceManager.cpp	2009-09-25 18:37:25 +0000
@@ -181,7 +181,8 @@ TableSpace* TableSpaceManager::createTab
 
 		createdFile = true;
 		add(tableSpace);
-		database->serialLog->logControl->createTableSpace.append(tableSpace);
+		if (database->serialLog && !database->serialLog->recovering)
+			database->serialLog->logControl->createTableSpace.append(tableSpace);
 		}
 	catch (...)
 		{
@@ -293,7 +294,9 @@ void TableSpaceManager::dropTableSpace(T
 	tableSpace->active = false;
 	JString filename = tableSpace->dbb->fileName;
 
-	database->serialLog->logControl->dropTableSpace.append(tableSpace, transaction);
+	if (database->serialLog && !database->serialLog->recovering)
+		database->serialLog->logControl->dropTableSpace.append(tableSpace, transaction);
+
 	database->commitSystemTransaction();
 	IO::deleteFile(filename);
 
@@ -361,8 +364,9 @@ void TableSpaceManager::expungeTableSpac
 			break;
 			}
 	
-	if (database->serialLog)
+	if (database->serialLog && !database->serialLog->recovering)
 		database->serialLog->logControl->tableSpaces.append(this);
+
 	sync.unlock();
 	//File already deleted, just close the file descriptor
 	tableSpace->close();

=== modified file 'storage/falcon/Transaction.cpp'
--- a/storage/falcon/Transaction.cpp	2009-09-22 17:20:10 +0000
+++ b/storage/falcon/Transaction.cpp	2009-09-25 18:37:25 +0000
@@ -269,7 +269,8 @@ void Transaction::commit()
 	// Write the commit message to the serial log for durability.
 	// If a crash happens after this, the recover will commit.
 
-	database->serialLog->logControl->commit.append(this);
+	if (database->serialLog && !database->serialLog->recovering)
+		database->serialLog->logControl->commit.append(this);
 
 	// Transfer transaction from active list to committed list, set committed state
 
@@ -427,7 +428,7 @@ void Transaction::rollback()
 	ASSERT(writePending);
 	writePending = false;
 
-	if (hasUpdates)
+	if (hasUpdates  && database->serialLog && !database->serialLog->recovering)
 		{
 		database->serialLog->preCommit(this);
 		database->serialLog->logControl->rollback.append(this);
@@ -484,7 +485,8 @@ void Transaction::prepare(int xidLen, co
 
 	// Flush a prepare record to the serial log
 
-	database->serialLog->logControl->prepare.append(transactionId, xidLength, xid);
+	if (database->serialLog && !database->serialLog->recovering)
+		database->serialLog->logControl->prepare.append(transactionId, xidLength, xid);
 
 	Sync sync(&syncDeferredIndexes, "Transaction::prepare");
 	sync.lock(Shared);
@@ -1329,13 +1331,16 @@ void Transaction::rollbackSavepoint(int 
 
 	if (chilledRecords)
 		{
-		database->serialLog->logControl->savepointRollback.append(transactionId, savePointId);
+		if (database->serialLog && !database->serialLog->recovering)
+			{
+			database->serialLog->logControl->savepointRollback.append(transactionId, savePointId);
 
-		// SavePoint::savepoints is a bitmap of other savepoints that have been chilled
+			// SavePoint::savepoints is a bitmap of other savepoints that have been chilled
 
-		if (savePoint->savepoints)
-			for (int n = savePointId; (n = savePoint->savepoints->nextSet(n)) >= savePointId; ++n)
-				database->serialLog->logControl->savepointRollback.append(transactionId, n);
+			if (savePoint->savepoints)
+				for (int n = savePointId; (n = savePoint->savepoints->nextSet(n)) >= savePointId; ++n)
+					database->serialLog->logControl->savepointRollback.append(transactionId, n);
+			}
 		}
 
 	savePoint = savePoints;


Attachment: [text/bzr-bundle] bzr/kevin.lewis@sun.com-20090929131205-yndd29v01ls5osca.bundle
Thread
bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2804)Kevin Lewis29 Sep