Commit 9cde720e authored by Rich Prohaska's avatar Rich Prohaska

fix the test_db_txn_lock test. close #422

git-svn-id: file:///svn/tokudb@2343 c7de825b-a66e-492c-adef-691d508d4ae1
parent d1b47d92
...@@ -623,15 +623,14 @@ int toku_logger_abort(TOKUTXN txn) { ...@@ -623,15 +623,14 @@ int toku_logger_abort(TOKUTXN txn) {
int toku_txnid2txn (TOKULOGGER logger, TXNID txnid, TOKUTXN *result) { int toku_txnid2txn (TOKULOGGER logger, TXNID txnid, TOKUTXN *result) {
if (logger==0) return -1; if (logger==0) return -1;
struct list *h = list_head(&logger->live_txns); struct list *l;
while (h) { for (l = list_head(&logger->live_txns); l != &logger->live_txns; l = l->next) {
TOKUTXN txn = list_struct(h, struct tokutxn, live_txns_link); TOKUTXN txn = list_struct(l, struct tokutxn, live_txns_link);
assert(txn->tag==TYP_TOKUTXN); assert(txn->tag==TYP_TOKUTXN);
if (txn->txnid64==txnid) { if (txn->txnid64==txnid) {
*result = txn; *result = txn;
return 0; return 0;
} }
h=list_tail(h);
} }
return -1; return -1;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment