From f0e169ab6e921bbaac3b0dee3d9269f104519660 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Mon, 19 Nov 2007 15:48:51 +0000 Subject: [PATCH] Handle NULL TXN git-svn-id: file:///svn/tokudb@638 c7de825b-a66e-492c-adef-691d508d4ae1 --- src/ydb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ydb.c b/src/ydb.c index c60a9539f8f..8c09527c3cd 100644 --- a/src/ydb.c +++ b/src/ydb.c @@ -486,7 +486,8 @@ int __toku_db_open(DB * db, DB_TXN * txn, const char *fname, const char *dbname, db->i->open_mode = mode; r = brt_open(db->i->brt, db->i->full_fname, dbname, flags & DB_CREATE, - db->dbenv->i->cachetable, txn->i->tokutxn); + db->dbenv->i->cachetable, + txn ? txn->i->tokutxn : NULL_TXN); if (r != 0) goto error_cleanup;