mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-26 08:42:53 -05:00
Support mdb_txn_abort(a reset txn).
This commit is contained in:
parent
ce6335b0d9
commit
8a562f560e
1 changed files with 3 additions and 0 deletions
|
|
@ -1980,6 +1980,7 @@ mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **ret)
|
|||
}
|
||||
|
||||
/** Common code for #mdb_txn_reset() and #mdb_txn_abort().
|
||||
* May be called twice for readonly txns: First reset it, then abort.
|
||||
* @param[in] txn the transaction handle to reset
|
||||
*/
|
||||
static void
|
||||
|
|
@ -2001,7 +2002,9 @@ mdb_txn_reset0(MDB_txn *txn)
|
|||
if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY)) {
|
||||
if (txn->mt_u.reader) {
|
||||
txn->mt_u.reader->mr_txnid = (txnid_t)-1;
|
||||
txn->mt_u.reader = NULL; /* do not touch mr_txnid again */
|
||||
}
|
||||
txn->mt_numdbs = 0; /* mark txn as reset, do not close DBs again */
|
||||
} else {
|
||||
MDB_page *dp;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue