]> git.sur5r.net Git - openldap/commitdiff
ITS#8360 tweak for LDAP_TXNs too
authorHoward Chu <hyc@openldap.org>
Tue, 26 Jan 2016 13:39:53 +0000 (13:39 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 26 Jan 2016 13:39:53 +0000 (13:39 +0000)
servers/slapd/back-mdb/id2entry.c

index d080f3f93e6f49b08b1c8e42ae4bc8f849de8ffe..f9adf002ba5cf536c97105eba1c0adb51f124b4e 100644 (file)
@@ -549,9 +549,12 @@ int mdb_txn( Operation *op, int txnop, OpExtra **ptr )
                return rc;
        case SLAP_TXN_COMMIT:
                rc = mdb_txn_commit( moi->moi_txn );
+               if ( rc )
+                       mdb->mi_numads = 0;
                op->o_tmpfree( moi, op->o_tmpmemctx );
                return rc;
        case SLAP_TXN_ABORT:
+               mdb->mi_numads = 0;
                mdb_txn_abort( moi->moi_txn );
                op->o_tmpfree( moi, op->o_tmpmemctx );
                return 0;