From 1d9a0313e55fccb180c934b8dc4298c882061385 Mon Sep 17 00:00:00 2001 From: Yoni Fogel Date: Tue, 12 Aug 2008 13:44:58 +0000 Subject: [PATCH] Addresses #1079 Final changes to make DB_TXN->parent public. git-svn-id: file:///svn/tokudb@5619 c7de825b-a66e-492c-adef-691d508d4ae1 --- src/ydb-internal.h | 1 - src/ydb.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ydb-internal.h b/src/ydb-internal.h index 8aa8d629343..80a35086dda 100644 --- a/src/ydb-internal.h +++ b/src/ydb-internal.h @@ -73,7 +73,6 @@ struct __toku_db_txn_internal { //TXNID txnid64; /* A sixty-four bit txn id. */ TOKUTXN tokutxn; toku_lth* lth; - DB_TXN *parent; }; struct __toku_dbc_internal { diff --git a/src/ydb.c b/src/ydb.c index 012fe210229..3031c64cf41 100644 --- a/src/ydb.c +++ b/src/ydb.c @@ -1028,13 +1028,13 @@ static int toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t f result->abort = locked_txn_abort; result->commit = locked_txn_commit; result->id = locked_txn_id; + result->parent = stxn; MALLOC(result->i); if (!result->i) { toku_free(result); return ENOMEM; } memset(result->i, 0, sizeof *result->i); - result->i->parent = stxn; int r; if (env->i->open_flags & DB_INIT_LOCK) { @@ -1236,7 +1236,7 @@ static inline void toku_swap_flag(u_int32_t* flag, u_int32_t* get_flag, a node has two non-completed txns at any time. */ static inline DB_TXN* toku_txn_ancestor(DB_TXN* txn) { - while (txn && txn->i->parent) txn = txn->i->parent; + while (txn && txn->parent) txn = txn->parent; return txn; }