Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-07-09 16:25:04-04:00, jas@rowvwade. +6 -0
Detect operations on dropped tablespaces.
storage/falcon/Dbb.cpp@stripped, 2007-07-09 16:24:54-04:00, jas@rowvwade. +10 -4
Fix bug(s) in drop tablespace.
storage/falcon/SRLDeleteIndex.cpp@stripped, 2007-07-09 16:24:54-04:00, jas@rowvwade. +8 -2
Don't try to drop indexes in dropped tablespaces.
storage/falcon/SRLDropTable.cpp@stripped, 2007-07-09 16:24:55-04:00, jas@rowvwade. +8 -4
Drop try to drop tables from dropped table spaces.
storage/falcon/SerialLog.cpp@stripped, 2007-07-09 16:24:55-04:00, jas@rowvwade. +13 -0
Detect operations on dropped tablespaces.
storage/falcon/SerialLog.h@stripped, 2007-07-09 16:24:55-04:00, jas@rowvwade. +2 -0
Detect operations on dropped tablespaces.
storage/falcon/TableSpaceManager.cpp@stripped, 2007-07-09 16:24:56-04:00, jas@rowvwade. +12 -1
Detect operations on dropped tablespaces.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jas
# Host: rowvwade.
# Root: D:/MySQL/mysql-5.1-falcon
--- 1.12/storage/falcon/SRLDeleteIndex.cpp 2007-07-09 16:25:30 -04:00
+++ 1.13/storage/falcon/SRLDeleteIndex.cpp 2007-07-09 16:25:30 -04:00
@@ -72,8 +72,11 @@
void SRLDeleteIndex::pass1()
{
log->bumpIndexIncarnation(indexId, tableSpaceId, objDeleted);
- Dbb *dbb = log->getDbb(tableSpaceId);
+ Dbb *dbb = log->findDbb(tableSpaceId);
+ if (!dbb)
+ return;
+
switch (indexVersion)
{
case INDEX_VERSION_0:
@@ -104,7 +107,10 @@
{
Sync sync(&log->syncIndexes, "SRLDeleteIndex::commit");
sync.lock(Exclusive);
- Dbb *dbb = log->getDbb(tableSpaceId);
+ Dbb *dbb = log->findDbb(tableSpaceId);
+
+ if (!dbb)
+ return;
switch (indexVersion)
{
--- 1.15/storage/falcon/TableSpaceManager.cpp 2007-07-09 16:25:30 -04:00
+++ 1.16/storage/falcon/TableSpaceManager.cpp 2007-07-09 16:25:30 -04:00
@@ -38,6 +38,7 @@
#include "SerialLogControl.h"
#include "SRLCreateTableSpace.h"
#include "SRLDropTableSpace.h"
+#include "Log.h"
#ifdef _DEBUG
#undef THIS_FILE
@@ -197,7 +198,17 @@
p = EncodedDataStream::decode(p, &id, true);
p = EncodedDataStream::decode(p, &fileName, true);
TableSpace *tableSpace = new TableSpace(database, name.getString(), id.getInt(), fileName.getString());
- tableSpace->open();
+
+ try
+ {
+ tableSpace->open();
+ }
+ catch(SQLException& exception)
+ {
+ Log::log("Couldn't open table space file \"%s\" for tablespace \"%s\": %s\n",
+ fileName.getString(), name.getString(), exception.getText());
+ }
+
add(tableSpace);
stream.clear();
}
--- 1.78/storage/falcon/Dbb.cpp 2007-07-09 16:25:30 -04:00
+++ 1.79/storage/falcon/Dbb.cpp 2007-07-09 16:25:30 -04:00
@@ -634,7 +634,10 @@
Validation validation (this, optionMask);
validation.inUse ((int32) HEADER_PAGE, "HeaderPage");
PageInventoryPage::validate (this, &validation);
- inversion->validate (&validation);
+
+ if (inversion)
+ inversion->validate (&validation);
+
Section::validateIndexes (this, &validation);
Section::validateSections (this, &validation);
PageInventoryPage::validateInventory (this, &validation);
@@ -1064,8 +1067,11 @@
void Dbb::close()
{
- cache->flush (this);
- closeFile();
+ if (fileId != -1)
+ {
+ cache->flush (this);
+ closeFile();
+ }
}
bool Dbb::hasDirtyPages()
@@ -1138,7 +1144,7 @@
void Dbb::dropDatabase()
{
- closeFile();
+ close();
deleteFile();
}
--- 1.25/storage/falcon/SRLDropTable.cpp 2007-07-09 16:25:30 -04:00
+++ 1.26/storage/falcon/SRLDropTable.cpp 2007-07-09 16:25:30 -04:00
@@ -83,7 +83,10 @@
if (!log->bumpSectionIncarnation(sectionId, tableSpaceId, objDeleted))
return;
- log->getDbb(tableSpaceId)->deleteSection(sectionId, NO_TRANSACTION);
+ Dbb *dbb = log->findDbb(tableSpaceId);
+
+ if (dbb)
+ dbb->deleteSection(sectionId, NO_TRANSACTION);
}
void SRLDropTable::print()
@@ -93,9 +96,10 @@
void SRLDropTable::commit(void)
{
- //Sync sync(&log->syncSections, "SRLDropTable::commit");
- //sync.lock(Exclusive);
- Section::deleteSection(log->getDbb(tableSpaceId), sectionId, NO_TRANSACTION);
+ Dbb *dbb = log->findDbb(tableSpaceId);
+
+ if (dbb)
+ Section::deleteSection(dbb, sectionId, NO_TRANSACTION);
}
void SRLDropTable::rollback(void)
--- 1.101/storage/falcon/SerialLog.cpp 2007-07-09 16:25:30 -04:00
+++ 1.102/storage/falcon/SerialLog.cpp 2007-07-09 16:25:30 -04:00
@@ -1423,6 +1423,19 @@
return tableSpaceManager->getTableSpace(tableSpaceId)->dbb;
}
+Dbb* SerialLog::findDbb(int tableSpaceId)
+{
+ if (tableSpaceId == 0)
+ return defaultDbb;
+
+ TableSpace *tableSpace = tableSpaceManager->findTableSpace(tableSpaceId);
+
+ if (!tableSpace)
+ return NULL;
+
+ return tableSpace->dbb;
+}
+
TableSpaceInfo* SerialLog::getTableSpaceInfo(int tableSpaceId)
{
TableSpaceInfo *info;
--- 1.48/storage/falcon/SerialLog.h 2007-07-09 16:25:30 -04:00
+++ 1.49/storage/falcon/SerialLog.h 2007-07-09 16:25:30 -04:00
@@ -219,6 +219,8 @@
private:
Thread *volatile writer;
+public:
+ Dbb* findDbb(int tableSpaceId);
};
#endif // !defined(AFX_SERIALLOG_H__D2A71E6B_A3B0_41C8_9C73_628DA067F722__INCLUDED_)
| Thread |
|---|
| • bk commit into 6.0-falcon tree (jas:1.2614) | U-ROWVWADEjas | 9 Jul |