Fixed TisActiveTransaction, cleaned up Tinit(), Tdeinit().

This commit is contained in:
Sears Russell 2007-03-03 22:51:07 +00:00
parent 078b45dbcc
commit ca57875007

View file

@ -112,20 +112,14 @@ int Tinit() {
setupOperationsTable(); setupOperationsTable();
dirtyPagesInit(); dirtyPagesInit();
LogInit(loggerType);
pageInit(); pageInit();
bufInit(); bufInit();
// try_ret(compensation_error()) {
LogInit(loggerType); pageOperationsInit();
// } end_ret(compensation_error());
try_ret(compensation_error()) {
pageOperationsInit();
} end_ret(compensation_error());
initNestedTopActions(); initNestedTopActions();
TallocInit(); TallocInit();
ThashInit(); ThashInit();
LinearHashNTAInit(); LinearHashNTAInit();
LinkedListNTAInit(); LinkedListNTAInit();
@ -381,7 +375,7 @@ lsn_t transactions_minRecLSN() {
} }
int TisActiveTransaction(int xid) { int TisActiveTransaction(int xid) {
if(xid > 0) { return 0; } if(xid < 0) { return 0; }
pthread_mutex_lock(&transactional_2_mutex); pthread_mutex_lock(&transactional_2_mutex);
int ret = xid != INVALID_XTABLE_XID && XactionTable[xid%MAX_TRANSACTIONS].xid == xid; int ret = xid != INVALID_XTABLE_XID && XactionTable[xid%MAX_TRANSACTIONS].xid == xid;
pthread_mutex_unlock(&transactional_2_mutex); pthread_mutex_unlock(&transactional_2_mutex);