From: Date: November 6 2008 1:49am Subject: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:2905) Bug#39789 List-Archive: http://lists.mysql.com/commits/57954 X-Bug: 39789 Message-Id: <0K9V005N1ZN2F350@fe-emea-09.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT #At file:///G:/bzr/mysql-6.0-falcon-team/ 2905 Vladislav Vaintroub 2008-11-06 Bug#39789 : Falcon recovery failure after several CREATE + DROP TABLESPACE The problem in this specific test was removal of datafiles in SRLDropTable space::redo(),even if tablespace with the same datafile path in use by another tablespace instance. The fix reimplements create/dropTablespace handling in recovery in a manner consistent with the rest of Falcon recovery. - pass1(check) of recovery collects information about which tablespaces are dropped at the end - during pass1 recovery is prepared to handle references to non-existing tablespaces - pass2 and redo skip any reference to dropped tablespace - tablespace that are not marked as deleted are created during pass2 (creating "physical" objects) modified: storage/falcon/SRLBlobDelete.cpp storage/falcon/SRLBlobUpdate.cpp storage/falcon/SRLCreateIndex.cpp storage/falcon/SRLCreateSection.cpp storage/falcon/SRLCreateTableSpace.cpp storage/falcon/SRLData.cpp storage/falcon/SRLDataPage.cpp storage/falcon/SRLDelete.cpp storage/falcon/SRLDeleteIndex.cpp storage/falcon/SRLDropTable.cpp storage/falcon/SRLDropTableSpace.cpp storage/falcon/SRLFreePage.cpp storage/falcon/SRLIndexAdd.cpp storage/falcon/SRLIndexDelete.cpp storage/falcon/SRLIndexPage.cpp storage/falcon/SRLInversionPage.cpp storage/falcon/SRLOverflowPages.cpp storage/falcon/SRLRecordLocator.cpp storage/falcon/SRLRecordStub.cpp storage/falcon/SRLSectionLine.cpp storage/falcon/SRLSectionPage.cpp storage/falcon/SRLSectionPromotion.cpp storage/falcon/SRLSequencePage.cpp storage/falcon/SRLUpdateBlob.cpp storage/falcon/SRLUpdateIndex.cpp storage/falcon/SRLUpdateRecords.cpp storage/falcon/SerialLog.cpp storage/falcon/SerialLog.h === modified file 'storage/falcon/SRLBlobDelete.cpp' --- a/storage/falcon/SRLBlobDelete.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLBlobDelete.cpp 2008-11-06 00:49:06 +0000 @@ -59,6 +59,9 @@ void SRLBlobDelete::pass1(void) void SRLBlobDelete::pass2(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; + bool ret1 = log->bumpPageIncarnation(locatorPage, tableSpaceId, objInUse); bool ret2 = log->bumpPageIncarnation(dataPage, tableSpaceId, objInUse); @@ -73,6 +76,8 @@ void SRLBlobDelete::pass2(void) void SRLBlobDelete::redo(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(locatorPage, tableSpaceId, objInUse); log->bumpPageIncarnation(dataPage, tableSpaceId, objInUse); } === modified file 'storage/falcon/SRLBlobUpdate.cpp' --- a/storage/falcon/SRLBlobUpdate.cpp 2007-11-01 20:28:51 +0000 +++ b/storage/falcon/SRLBlobUpdate.cpp 2008-11-06 00:49:06 +0000 @@ -76,14 +76,8 @@ void SRLBlobUpdate::pass1(void) void SRLBlobUpdate::pass2(void) { - if (transactionId == 11847) - print(); - - /*** - if (log->tracePage == locatorPage || (dataPage && log->tracePage == dataPage)) - print(); - ***/ - + if (log->isTableSpaceDropped(tableSpaceId)) + return; bool ret1 = log->bumpPageIncarnation(locatorPage, tableSpaceId, objInUse); bool ret2 = log->bumpPageIncarnation(dataPage, tableSpaceId, objInUse); @@ -104,6 +98,8 @@ void SRLBlobUpdate::pass2(void) void SRLBlobUpdate::redo(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(locatorPage, tableSpaceId, objInUse); log->bumpPageIncarnation(dataPage, tableSpaceId, objInUse); } === modified file 'storage/falcon/SRLCreateIndex.cpp' --- a/storage/falcon/SRLCreateIndex.cpp 2007-12-04 21:16:33 +0000 +++ b/storage/falcon/SRLCreateIndex.cpp 2008-11-06 00:49:06 +0000 @@ -70,6 +70,9 @@ void SRLCreateIndex::pass1() void SRLCreateIndex::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; + if (!log->bumpIndexIncarnation(indexId, tableSpaceId, objInUse)) return; === modified file 'storage/falcon/SRLCreateSection.cpp' --- a/storage/falcon/SRLCreateSection.cpp 2007-10-24 19:31:59 +0000 +++ b/storage/falcon/SRLCreateSection.cpp 2008-11-06 00:49:06 +0000 @@ -66,11 +66,15 @@ void SRLCreateSection::read() void SRLCreateSection::pass1() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); } void SRLCreateSection::pass2(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); } === modified file 'storage/falcon/SRLCreateTableSpace.cpp' --- a/storage/falcon/SRLCreateTableSpace.cpp 2008-07-17 13:52:17 +0000 +++ b/storage/falcon/SRLCreateTableSpace.cpp 2008-11-06 00:49:06 +0000 @@ -85,14 +85,17 @@ void SRLCreateTableSpace::read() void SRLCreateTableSpace::pass1() { - TableSpaceInit tsInit; - tsInit.comment = comment; - log->database->tableSpaceManager->redoCreateTableSpace(tableSpaceId, nameLength, name, filenameLength, filename, type, &tsInit); + } void SRLCreateTableSpace::pass2() { - + if (log->isTableSpaceDropped(tableSpaceId)) + return; + TableSpaceInit tsInit; + tsInit.comment = comment; + log->database->tableSpaceManager->redoCreateTableSpace(tableSpaceId, nameLength, name, filenameLength, filename, type, &tsInit); + } void SRLCreateTableSpace::commit() === modified file 'storage/falcon/SRLData.cpp' --- a/storage/falcon/SRLData.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLData.cpp 2008-11-06 00:49:06 +0000 @@ -82,6 +82,8 @@ void SRLData::pass1() void SRLData::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; SerialLogTransaction *transaction = control->getTransaction(transactionId); if (transaction->state == sltCommitted && log->isSectionActive(sectionId, tableSpaceId)) === modified file 'storage/falcon/SRLDataPage.cpp' --- a/storage/falcon/SRLDataPage.cpp 2007-10-25 19:11:13 +0000 +++ b/storage/falcon/SRLDataPage.cpp 2008-11-06 00:49:06 +0000 @@ -93,7 +93,9 @@ void SRLDataPage::pass2() { if (log->tracePage == pageNumber || log->tracePage == locatorPageNumber) print(); - + + if (log->isTableSpaceDropped(tableSpaceId)) + return; bool sectionActive = log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); bool locatorPageActive = log->bumpPageIncarnation(locatorPageNumber, tableSpaceId, objInUse); @@ -113,6 +115,8 @@ void SRLDataPage::pass2() void SRLDataPage::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); log->bumpPageIncarnation(locatorPageNumber, tableSpaceId, objInUse); log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); === modified file 'storage/falcon/SRLDelete.cpp' --- a/storage/falcon/SRLDelete.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLDelete.cpp 2008-11-06 00:49:06 +0000 @@ -77,6 +77,8 @@ void SRLDelete::pass1() void SRLDelete::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; SerialLogTransaction *transaction = control->getTransaction(transactionId); if (transaction->state == sltCommitted && log->isSectionActive(sectionId, tableSpaceId)) === modified file 'storage/falcon/SRLDeleteIndex.cpp' --- a/storage/falcon/SRLDeleteIndex.cpp 2008-07-15 18:57:27 +0000 +++ b/storage/falcon/SRLDeleteIndex.cpp 2008-11-06 00:49:06 +0000 @@ -94,6 +94,8 @@ void SRLDeleteIndex::pass1() void SRLDeleteIndex::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpIndexIncarnation(indexId, tableSpaceId, objDeleted)) return; } === modified file 'storage/falcon/SRLDropTable.cpp' --- a/storage/falcon/SRLDropTable.cpp 2008-06-11 18:31:05 +0000 +++ b/storage/falcon/SRLDropTable.cpp 2008-11-06 00:49:06 +0000 @@ -72,11 +72,15 @@ void SRLDropTable::pass1() void SRLDropTable::pass2(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpSectionIncarnation(sectionId, tableSpaceId, objDeleted); } void SRLDropTable::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpSectionIncarnation(sectionId, tableSpaceId, objDeleted)) return; === modified file 'storage/falcon/SRLDropTableSpace.cpp' --- a/storage/falcon/SRLDropTableSpace.cpp 2008-06-08 22:12:35 +0000 +++ b/storage/falcon/SRLDropTableSpace.cpp 2008-11-06 00:49:06 +0000 @@ -65,12 +65,12 @@ void SRLDropTableSpace::read() void SRLDropTableSpace::pass1() { - + log->setTableSpaceDropped(tableSpaceId); } void SRLDropTableSpace::pass2() { - + log->tableSpaceManager->expungeTableSpace(tableSpaceId); } void SRLDropTableSpace::commit() @@ -80,5 +80,4 @@ void SRLDropTableSpace::commit() void SRLDropTableSpace::redo() { - log->tableSpaceManager->expungeTableSpace(tableSpaceId); } === modified file 'storage/falcon/SRLFreePage.cpp' --- a/storage/falcon/SRLFreePage.cpp 2008-03-11 16:15:47 +0000 +++ b/storage/falcon/SRLFreePage.cpp 2008-11-06 00:49:06 +0000 @@ -69,7 +69,8 @@ void SRLFreePage::pass2(void) { if (pageNumber == log->tracePage) print(); - + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpPageIncarnation(pageNumber, tableSpaceId, objDeleted)) return; @@ -78,6 +79,8 @@ void SRLFreePage::pass2(void) void SRLFreePage::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(pageNumber, tableSpaceId, objDeleted); } === modified file 'storage/falcon/SRLIndexAdd.cpp' --- a/storage/falcon/SRLIndexAdd.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLIndexAdd.cpp 2008-11-06 00:49:06 +0000 @@ -76,9 +76,10 @@ void SRLIndexAdd::read() void SRLIndexAdd::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->isIndexActive(indexId, tableSpaceId)) return; - //SerialLogTransaction *transaction = control->getTransaction(transactionId); IndexKey indexKey(length, data); === modified file 'storage/falcon/SRLIndexDelete.cpp' --- a/storage/falcon/SRLIndexDelete.cpp 2007-11-01 16:50:25 +0000 +++ b/storage/falcon/SRLIndexDelete.cpp 2008-11-06 00:49:06 +0000 @@ -75,6 +75,8 @@ void SRLIndexDelete::read() void SRLIndexDelete::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->isIndexActive(indexId, tableSpaceId)) return; === modified file 'storage/falcon/SRLIndexPage.cpp' --- a/storage/falcon/SRLIndexPage.cpp 2008-03-17 18:38:53 +0000 +++ b/storage/falcon/SRLIndexPage.cpp 2008-11-06 00:49:06 +0000 @@ -97,6 +97,8 @@ void SRLIndexPage::pass1() void SRLIndexPage::pass2() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) { if (log->tracePage == pageNumber) @@ -133,5 +135,7 @@ void SRLIndexPage::print() void SRLIndexPage::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); } === modified file 'storage/falcon/SRLInversionPage.cpp' --- a/storage/falcon/SRLInversionPage.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLInversionPage.cpp 2008-11-06 00:49:06 +0000 @@ -58,6 +58,8 @@ void SRLInversionPage::pass1() void SRLInversionPage::pass2() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); } @@ -83,6 +85,8 @@ void SRLInversionPage::read() void SRLInversionPage::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) return; } === modified file 'storage/falcon/SRLOverflowPages.cpp' --- a/storage/falcon/SRLOverflowPages.cpp 2008-03-11 16:15:47 +0000 +++ b/storage/falcon/SRLOverflowPages.cpp 2008-11-06 00:49:06 +0000 @@ -82,28 +82,14 @@ void SRLOverflowPages::pass1(void) void SRLOverflowPages::pass2(void) { - for (const UCHAR *p = data, *end = data + dataLength; p < end;) - { - int pageNumber = getInt(&p); - - if (log->tracePage == pageNumber) - print(); - - log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); - } + if (log->isTableSpaceDropped(tableSpaceId)) + return; + pass1(); } void SRLOverflowPages::redo(void) { - for (const UCHAR *p = data, *end = data + dataLength; p < end;) - { - int pageNumber = getInt(&p); - - if (log->tracePage == pageNumber) - print(); - - log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); - } + pass2(); } void SRLOverflowPages::print(void) === modified file 'storage/falcon/SRLRecordLocator.cpp' --- a/storage/falcon/SRLRecordLocator.cpp 2007-12-02 20:42:48 +0000 +++ b/storage/falcon/SRLRecordLocator.cpp 2008-11-06 00:49:06 +0000 @@ -81,13 +81,16 @@ void SRLRecordLocator::pass2() { if (log->tracePage == pageNumber) print(); - + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) log->getDbb(tableSpaceId)->redoRecordLocatorPage(sectionId, sequence, pageNumber, control->isPostFlush()); } void SRLRecordLocator::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) return; } === modified file 'storage/falcon/SRLRecordStub.cpp' --- a/storage/falcon/SRLRecordStub.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLRecordStub.cpp 2008-11-06 00:49:06 +0000 @@ -74,6 +74,8 @@ void SRLRecordStub::pass1() void SRLRecordStub::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->isSectionActive(sectionId, tableSpaceId)) return; === modified file 'storage/falcon/SRLSectionLine.cpp' --- a/storage/falcon/SRLSectionLine.cpp 2007-10-25 19:11:13 +0000 +++ b/storage/falcon/SRLSectionLine.cpp 2008-11-06 00:49:06 +0000 @@ -53,7 +53,8 @@ void SRLSectionLine::pass1(void) { if (pageNumber == log->tracePage || dataPageNumber == log->tracePage) print(); - + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); log->bumpPageIncarnation(dataPageNumber, tableSpaceId, objInUse); } @@ -62,7 +63,8 @@ void SRLSectionLine::pass2(void) { if (pageNumber == log->tracePage || dataPageNumber == log->tracePage) print(); - + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(dataPageNumber, tableSpaceId, objInUse); if (log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) === modified file 'storage/falcon/SRLSectionPage.cpp' --- a/storage/falcon/SRLSectionPage.cpp 2008-03-12 12:17:52 +0000 +++ b/storage/falcon/SRLSectionPage.cpp 2008-11-06 00:49:06 +0000 @@ -100,7 +100,9 @@ void SRLSectionPage::pass2() if ((pageNumber && log->tracePage == pageNumber) || (parentPage && log->tracePage == parentPage)) print(); - + + if (log->isTableSpaceDropped(tableSpaceId)) + return; bool ret = true; if (pageNumber) @@ -115,6 +117,8 @@ void SRLSectionPage::pass2() void SRLSectionPage::redo() { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(parentPage, tableSpaceId, objInUse); if (pageNumber) === modified file 'storage/falcon/SRLSectionPromotion.cpp' --- a/storage/falcon/SRLSectionPromotion.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLSectionPromotion.cpp 2008-11-06 00:49:06 +0000 @@ -68,6 +68,8 @@ void SRLSectionPromotion::pass1(void) void SRLSectionPromotion::pass2(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) if (control->isPostFlush()) Section::redoSectionPromotion(log->getDbb(tableSpaceId), sectionId, rootPageNumber, length, data, pageNumber); @@ -75,6 +77,8 @@ void SRLSectionPromotion::pass2(void) void SRLSectionPromotion::redo(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (!log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) return; === modified file 'storage/falcon/SRLSequencePage.cpp' --- a/storage/falcon/SRLSequencePage.cpp 2007-09-20 15:44:25 +0000 +++ b/storage/falcon/SRLSequencePage.cpp 2008-11-06 00:49:06 +0000 @@ -61,11 +61,15 @@ void SRLSequencePage::pass1(void) void SRLSequencePage::pass2(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse); } void SRLSequencePage::redo(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (log->bumpPageIncarnation(pageNumber, tableSpaceId, objInUse)) log->getDbb(tableSpaceId)->redoSequencePage(pageSequence, pageNumber); } === modified file 'storage/falcon/SRLUpdateBlob.cpp' --- a/storage/falcon/SRLUpdateBlob.cpp 2008-04-07 16:04:51 +0000 +++ b/storage/falcon/SRLUpdateBlob.cpp 2008-11-06 00:49:06 +0000 @@ -64,7 +64,8 @@ void SRLUpdateBlob::commit(void) void SRLUpdateBlob::redo(void) { SerialLogTransaction *transaction = control->getTransaction(transactionId); - + if (log->isTableSpaceDropped(tableSpaceId)) + return; if (transaction->state == sltCommitted && log->isSectionActive(sectionId, tableSpaceId)) { Stream stream; === modified file 'storage/falcon/SRLUpdateIndex.cpp' --- a/storage/falcon/SRLUpdateIndex.cpp 2008-10-16 02:53:35 +0000 +++ b/storage/falcon/SRLUpdateIndex.cpp 2008-11-06 00:49:06 +0000 @@ -155,6 +155,8 @@ void SRLUpdateIndex::pass1(void) void SRLUpdateIndex::redo(void) { + if (log->isTableSpaceDropped(tableSpaceId)) + return; execute(); } === modified file 'storage/falcon/SRLUpdateRecords.cpp' --- a/storage/falcon/SRLUpdateRecords.cpp 2008-10-29 23:25:13 +0000 +++ b/storage/falcon/SRLUpdateRecords.cpp 2008-11-06 00:49:06 +0000 @@ -28,6 +28,7 @@ #include "Sync.h" #include "SerialLogWindow.h" #include "Format.h" +#include "SQLException.h" SRLUpdateRecords::SRLUpdateRecords(void) { @@ -331,7 +332,23 @@ void SRLUpdateRecords::pass1(void) uint sectionId = (id >= 0) ? id : -id - 1; getInt(&p); // recordNumber int length = getInt(&p); - log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); + + if (log->recoveryPhase == 1) + { + try + { + log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); + } + catch(SQLException &e) + { + if (e.getSqlcode() != TABLESPACE_NOT_EXIST_ERROR) + throw; + } + } + else if (!log->isTableSpaceDropped(tableSpaceId)) + log->bumpSectionIncarnation(sectionId, tableSpaceId, objInUse); + + p += length; } } === modified file 'storage/falcon/SerialLog.cpp' --- a/storage/falcon/SerialLog.cpp 2008-10-30 00:22:54 +0000 +++ b/storage/falcon/SerialLog.cpp 2008-11-06 00:49:06 +0000 @@ -44,6 +44,7 @@ #include "TableSpaceManager.h" #include "TableSpace.h" #include "Gopher.h" +#include "Log.h" #ifdef _DEBUG #undef THIS_FILE @@ -54,6 +55,7 @@ static const int TRACE_PAGE = 0; extern uint falcon_gopher_threads; extern uint64 falcon_serial_log_file_size; +extern uint falcon_debug_mask; //static const int windowBuffers = 10; static bool debug; @@ -328,9 +330,31 @@ void SerialLog::recover() recoveryPhase = 1; // Take Inventory (serialLogTransactions, recoveryObject states, last checkpoint) // Make a first pass finding records, transactions, etc. + // Ignore "tablespace not found exception" on this stage, + // we do not know if tablespace will be dropped later. + + // MAKE_PHILIP_HAPPY: don't output messages on when exceptions are generated + uint32 debugMask = falcon_debug_mask; + falcon_debug_mask &= ~LogException; while ( (record = control.nextRecord()) ) - record->pass1(); + { + try + { + record->pass1(); + } + catch(SQLError &e) + { + if(e.getSqlcode() != TABLESPACE_NOT_EXIST_ERROR) + { + falcon_debug_mask = debugMask; + throw; + } + } + } + + // restore debug mask + falcon_debug_mask = debugMask; //control.debug = false; pass1 = false; @@ -400,6 +424,7 @@ void SerialLog::recover() recoveryPages = NULL; recoveryIndexes = NULL; recoverySections = NULL; + droppedTableSpaces.clear(); for (window = firstWindow; window; window = window->next) if (!(window->inUse == 0 || window == writeWindow)) @@ -1285,6 +1310,20 @@ void SerialLog::setIndexInactive(int id, recoveryIndexes->setInactive(id, tableSpaceId); } +void SerialLog::setTableSpaceDropped(int tableSpaceId) +{ + ASSERT(recovering); + droppedTableSpaces.set(tableSpaceId); +} + + +bool SerialLog::isTableSpaceDropped(int tableSpaceId) +{ + if (!recovering) + return false; + return droppedTableSpaces.isSet(tableSpaceId); +} + bool SerialLog::sectionInUse(int sectionId, int tableSpaceId) { TableSpaceInfo *info = getTableSpaceInfo(tableSpaceId); === modified file 'storage/falcon/SerialLog.h' --- a/storage/falcon/SerialLog.h 2008-10-20 21:28:11 +0000 +++ b/storage/falcon/SerialLog.h 2008-11-06 00:49:06 +0000 @@ -29,6 +29,7 @@ #include "Stack.h" #include "DenseArray.h" #include "Queue.h" +#include "Bitmap.h" static const unsigned int altLogFlag = 0x80000000; static const int srlSignature = 123456789; @@ -126,6 +127,8 @@ public: void setSectionInactive(int id, int tableSpaceId); void setIndexActive(int id, int tableSpaceId); void setIndexInactive(int id, int tableSpaceId); + void setTableSpaceDropped(int tableSpaceId); + bool isTableSpaceDropped(int tableSpaceId); void updateSectionUseVector(uint sectionId, int tableSpaceId, int delta); void updateIndexUseVector(uint indexId, int tableSpaceId, int delta); bool sectionInUse(int sectionId, int tableSpaceId); @@ -170,6 +173,7 @@ public: RecoveryObjects *recoveryPages; RecoveryObjects *recoverySections; RecoveryObjects *recoveryIndexes; + Bitmap droppedTableSpaces; Dbb *defaultDbb; Gopher *gophers; Thread *srlQueue;