From: Hallvard Furuseth Date: Thu, 13 Jun 2013 06:58:25 +0000 (+0200) Subject: ITS#7515 Nested MDB txns: Inherit txn flags. X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~36^2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60086c1bc77fafecef274a165b308b28902dfebb;p=openldap ITS#7515 Nested MDB txns: Inherit txn flags. Committing a nested txn lost the MDB_TXN_DIRTY flag in the parent, unless the child had set it too. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 97926d9e14..df2e888c61 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1971,6 +1971,7 @@ mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **ret) parent->mt_child = txn; txn->mt_parent = parent; txn->mt_numdbs = parent->mt_numdbs; + txn->mt_flags = parent->mt_flags; txn->mt_dbxs = parent->mt_dbxs; memcpy(txn->mt_dbs, parent->mt_dbs, txn->mt_numdbs * sizeof(MDB_db)); /* Copy parent's mt_dbflags, but clear DB_NEW */