lmdb: Clear error from previous txn on renew.

Change-Id: I45e608d4d1ad3ffa3ad20e8a6b579708f25c3966
This commit is contained in:
Hallvard Furuseth 2015-04-08 21:47:24 +02:00 committed by Leo Yuriev
parent 9752e58a14
commit 8103d0b458

3
mdb.c
View File

@ -2958,8 +2958,9 @@ mdb_txn_renew0(MDB_txn *txn)
uint16_t x;
int rc, new_notls = 0;
txn->mt_flags &= MDB_TXN_BEGIN_FLAGS;
if (txn->mt_flags & MDB_TXN_RDONLY) {
txn->mt_flags &= MDB_TXN_BEGIN_FLAGS;
txn->mt_flags = MDB_TXN_RDONLY;
/* Setup db info */
txn->mt_numdbs = env->me_numdbs;
txn->mt_dbxs = env->me_dbxs; /* mostly static anyway */