Below is the list of changes that have just been committed into a local
6.0 repository of cpowers. When cpowers 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, 2008-01-26 16:52:25-06:00, cpowers@stripped +4 -0
Bug#33634, Falcon queries starved for long time.
- Moved invalidateCompiledStatements out of syncTables exclusive lock in dropTable to
prevent deadlock.
- Added assertions to check for corrupt savepoint and table share linked lists.
storage/falcon/Database.cpp@stripped, 2008-01-26 16:52:21-06:00, cpowers@stripped +3
-1
Moved invalidateCompiledStatements out of exclusive lock of syncTables to avoid
deadlock.
storage/falcon/Database.h@stripped, 2008-01-26 16:52:21-06:00, cpowers@stripped +1 -1
Added comment re use of exclusive locks with syncTables and syncStatements.
storage/falcon/StorageHandler.cpp@stripped, 2008-01-26 16:52:21-06:00,
cpowers@stripped +4 -0
Added assertions to check for circular references in tableShare hash table.
storage/falcon/Transaction.cpp@stripped, 2008-01-26 16:52:21-06:00, cpowers@stripped
+6 -1
Added assertions to check for circular references in savepoint lists.
diff -Nrup a/storage/falcon/Database.cpp b/storage/falcon/Database.cpp
--- a/storage/falcon/Database.cpp 2008-01-22 14:26:27 -06:00
+++ b/storage/falcon/Database.cpp 2008-01-26 16:52:21 -06:00
@@ -1408,8 +1408,10 @@ void Database::dropTable(Table * table,
break;
}
- invalidateCompiledStatements(table);
sync.unlock();
+
+ invalidateCompiledStatements(table);
+
table->drop(transaction);
table->expunge(getSystemTransaction());
delete table;
diff -Nrup a/storage/falcon/Database.h b/storage/falcon/Database.h
--- a/storage/falcon/Database.h 2008-01-19 13:04:51 -06:00
+++ b/storage/falcon/Database.h 2008-01-26 16:52:21 -06:00
@@ -255,7 +255,7 @@ public:
Applications *applications;
SyncObject syncObject;
SyncObject syncTables;
- SyncObject syncStatements;
+ SyncObject syncStatements; // exclusive lock ok only if syncTables not exclusive
SyncObject syncAddStatement;
SyncObject syncSysConnection;
SyncObject syncResultSets;
diff -Nrup a/storage/falcon/StorageHandler.cpp b/storage/falcon/StorageHandler.cpp
--- a/storage/falcon/StorageHandler.cpp 2007-12-02 14:17:12 -06:00
+++ b/storage/falcon/StorageHandler.cpp 2008-01-26 16:52:21 -06:00
@@ -549,6 +549,8 @@ StorageTableShare* StorageHandler::findT
tableShare->collision = tables[slot];
tables[slot] = tableShare;
+ ASSERT(tableShare->collision != tableShare);
+
return tableShare;
}
@@ -615,6 +617,8 @@ void StorageHandler::addTable(StorageTab
sync.lock(Exclusive);
table->collision = tables[slot];
tables[slot] = table;
+
+ ASSERT(table->collision != table);
}
void StorageHandler::removeTable(StorageTableShare* table)
diff -Nrup a/storage/falcon/Transaction.cpp b/storage/falcon/Transaction.cpp
--- a/storage/falcon/Transaction.cpp 2008-01-23 11:41:26 -06:00
+++ b/storage/falcon/Transaction.cpp 2008-01-26 16:52:21 -06:00
@@ -247,7 +247,7 @@ void Transaction::commit()
TransactionManager *transactionManager = database->transactionManager;
addRef();
- Log::log(LogXARecovery, "Commit transaction %d\n", transactionId);
+ Log::log(LogXARecovery, "%d: Commit transaction %d\n", database->deltaTime,
transactionId);
if (state == Active)
{
@@ -1007,6 +1007,8 @@ int Transaction::createSavepoint()
{
SavePoint *savePoint;
+ ASSERT((savePoints || freeSavePoints) ? (savePoints != freeSavePoints) : true);
+
if ( (savePoint = freeSavePoints) )
freeSavePoints = savePoint->next;
else
@@ -1017,6 +1019,8 @@ int Transaction::createSavepoint()
savePoint->next = savePoints;
savePoints = savePoint;
+ ASSERT(savePoint->next != savePoint);
+
return savePoint->id;
}
@@ -1029,6 +1033,7 @@ void Transaction::releaseSavepoint(int s
*ptr = savePoint->next;
savePoint->next = freeSavePoints;
freeSavePoints = savePoint;
+ ASSERT((savePoints || freeSavePoints) ? (savePoints != freeSavePoints) : true);
// commit pending record versions to the next pending savepoint
| Thread |
|---|
| • bk commit into 6.0 tree (cpowers:1.2779) BUG#33634 | cpowers | 26 Jan 2008 |