#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
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, recovery after such point is not guaranteed
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:21:00 +0000
@@ -1640,6 +1640,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:21: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:21: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] firstname.lastname@example.org