]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-mdb/tools.c
ITS#8360 fix ad info after failed txn
[openldap] / servers / slapd / back-mdb / tools.c
index 482f472b77f1e99e26d9a222766ed50202185c81..52b62657c2bc13824ab6a6141fdc421563ee4f33 100644 (file)
@@ -713,6 +713,7 @@ done:
                        mdb_tool_txn = NULL;
                        idcursor = NULL;
                        if( rc != 0 ) {
+                               mdb->mi_numads = 0;
                                snprintf( text->bv_val, text->bv_len,
                                                "txn_commit failed: %s (%d)",
                                                mdb_strerror(rc), rc );
@@ -983,6 +984,7 @@ done:
        if( rc == 0 ) {
                rc = mdb_txn_commit( mdb_tool_txn );
                if( rc != 0 ) {
+                       mdb->mi_numads = 0;
                        snprintf( text->bv_val, text->bv_len,
                                        "txn_commit failed: %s (%d)",
                                        mdb_strerror(rc), rc );