#At file:///G:/bzr/mysql-6.0-falcon-team/ based on revid:kevin.lewis@stripped
3129 Vladislav Vaintroub 2009-04-19
Bug #36993 Falcon reports Index SCHEDULE..PRIMARY_KEY in SYSTEM.SCHEDULE damaged
The problem here is that mysqld was killed before database was completely created (i.e
before all data dictionary was completely written to the disk). Falcon cannot handle such
sutuations gracefully yet and recovery after such point is not guaranteed to succeed.
The patch improves the sutation a little bit, disabling user queiries until database is fully
created and written to the disk.
Also, this patch introduces a clean Falcon shutdown : waiting for background theads to
complete their work , followed by flushing the page cache. This will eliminate the need
for recovery after a clean shutdown.
=== modified file 'storage/falcon/Database.cpp'
--- a/storage/falcon/Database.cpp 2009-04-09 15:40:11 +0000
+++ b/storage/falcon/Database.cpp 2009-04-19 20:15:00 +0000
@@ -711,6 +711,7 @@ void Database::createDatabase(const char
serialLogBlockSize = serialLog->getBlockSize();
@@ -1640,6 +1641,9 @@ void Database::shutdown()
+ // Wait for all gophers to finish.
=== modified file 'storage/falcon/StorageHandler.cpp'
--- a/storage/falcon/StorageHandler.cpp 2009-03-31 18:19:17 +0000
+++ b/storage/falcon/StorageHandler.cpp 2009-04-19 20:15:00 +0000
@@ -1035,6 +1035,11 @@ void StorageHandler::createDatabase(void
+ Database *database = dictionaryConnection->database;
inCreateDatabase = false;
=== modified file 'storage/falcon/TransactionManager.cpp'
--- a/storage/falcon/TransactionManager.cpp 2009-04-06 12:33:12 +0000
+++ b/storage/falcon/TransactionManager.cpp 2009-04-19 20:15:00 +0000
@@ -177,6 +177,8 @@ bool TransactionManager::hasUncommittedR
// Wait until all committed records for a table are purged by gophers
// (their transaction become write complete)
+// If table is NULL pointer, the functions wait for all transactions to
+// become write complete
void TransactionManager::waitForWriteComplete(Table* table)
@@ -189,11 +191,18 @@ void TransactionManager::waitForWriteCom
for (Transaction *trans = committedTransactions.first; trans;
trans = trans->next)
- if (trans->hasRecords(table)&& trans->writePending)
- again = true;
+ if (table)
+ if (trans->hasRecords(table)&& trans->writePending)
+ again = true;
+ again = true;
+ if (again)
Attachment: [text/bzr-bundle] email@example.com
|• bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3129)Bug#36993||Vladislav Vaintroub||19 Apr|