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-06-20 15:07:34-04:00, jas@rowvwade. +4 -0
More transaction accounting diagnostic code.
storage/falcon/Transaction.cpp@stripped, 2007-06-20 15:07:26-04:00, jas@rowvwade. +15 -0
More transaction accounting diagnostic code.
storage/falcon/Transaction.h@stripped, 2007-06-20 15:07:26-04:00, jas@rowvwade. +1 -0
More transaction accounting diagnostic code.
storage/falcon/TransactionManager.cpp@stripped, 2007-06-20 15:07:26-04:00, jas@rowvwade. +17 -0
More transaction accounting diagnostic code.
storage/falcon/TransactionManager.h@stripped, 2007-06-20 15:07:27-04:00, jas@rowvwade. +1 -0
More transaction accounting diagnostic code.
# 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.15/storage/falcon/TransactionManager.cpp 2007-06-20 15:07:55 -04:00
+++ 1.16/storage/falcon/TransactionManager.cpp 2007-06-20 15:07:55 -04:00
@@ -369,3 +369,20 @@
return NULL;
}
+
+void TransactionManager::validateDepedendencies(void)
+{
+ Sync sync(&committedTransactions.syncObject, "TransactionManager::validateDepedendencies");
+ sync.lock(Shared);
+ Transaction *transaction;
+
+ for (transaction = activeTransactions.first; transaction; transaction = transaction->next)
+ transaction->validateDependencies(false);
+
+ sync.unlock();
+ Sync syncCommitted(&committedTransactions.syncObject, "TransactionManager::validateDepedendencies");
+ syncCommitted.lock(Shared);
+
+ for (transaction = committedTransactions.first; transaction; transaction = transaction->next)
+ transaction->validateDependencies(true);
+}
--- 1.13/storage/falcon/TransactionManager.h 2007-06-20 15:07:55 -04:00
+++ 1.14/storage/falcon/TransactionManager.h 2007-06-20 15:07:55 -04:00
@@ -55,6 +55,7 @@
Queue<Transaction> activeTransactions;
Queue<Transaction> committedTransactions;
Transaction* findTransaction(int transactionId);
+ void validateDepedendencies(void);
};
#endif
--- 1.98/storage/falcon/Transaction.cpp 2007-06-20 15:07:55 -04:00
+++ 1.99/storage/falcon/Transaction.cpp 2007-06-20 15:07:55 -04:00
@@ -152,6 +152,7 @@
syncActive.unlock();
}
+ validateDependencies(true);
delete [] states;
delete [] xid;
@@ -211,6 +212,7 @@
}
TransactionManager *transactionManager = database->transactionManager;
+ transactionManager->validateDepedendencies();
addRef();
//#ifndef XA_ENABLED
@@ -279,12 +281,14 @@
syncCommitted.lock(Exclusive);
transactionManager->committedTransactions.append(this);
release();
+ transactionManager->validateDepedendencies();
}
void Transaction::commitNoUpdates(void)
{
TransactionManager *transactionManager = database->transactionManager;
+ transactionManager->validateDepedendencies();
addRef();
ASSERT(!deferredIndexes);
@@ -327,6 +331,7 @@
transactionId = 0;
state = Available;
release();
+ transactionManager->validateDepedendencies();
}
void Transaction::rollback()
@@ -1039,4 +1044,14 @@
if ((use == 1) && (state == Committed) && (dependencies == 0) && !writePending)
database->transactionManager->removeCommittedTransaction(this);
+}
+
+void Transaction::validateDependencies(bool noDependencies)
+{
+ for (TransState *state = states, *end = states + numberStates; state < end; ++state)
+ if (state->transaction)
+ {
+ ASSERT(!noDependencies);
+ ASSERT(state->transaction->transactionId == state->transactionId);
+ }
}
--- 1.47/storage/falcon/Transaction.h 2007-06-20 15:07:55 -04:00
+++ 1.48/storage/falcon/Transaction.h 2007-06-20 15:07:55 -04:00
@@ -171,6 +171,7 @@
void fullyCommitted(void);
void releaseCommittedTransaction(void);
void commitNoUpdates(void);
+ void validateDependencies(bool noDependencies);
};
#endif // !defined(AFX_TRANSACTION_H__02AD6A4D_A433_11D2_AB5B_0000C01D2301__INCLUDED_)
| Thread |
|---|
| • bk commit into 6.0-falcon tree (jas:1.2589) | U-ROWVWADEjas | 20 Jun |