]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9095 insert missing commit at end of slapindex processing
authorHoward Chu <hyc@openldap.org>
Fri, 11 Oct 2019 19:47:29 +0000 (20:47 +0100)
committerHoward Chu <hyc@openldap.org>
Fri, 11 Oct 2019 19:48:51 +0000 (20:48 +0100)
servers/slapd/back-mdb/tools.c

index e28f9f8e430190be3b01bff74739b68646f271b3..f0e474f9dd4d9aa0510908342b6bd0fdfe1668d6 100644 (file)
@@ -217,6 +217,17 @@ int mdb_tool_entry_close(
                }
                mdb_tool_txn = NULL;
        }
+       if( txi ) {
+               int rc;
+               if (( rc = mdb_txn_commit( txi ))) {
+                       Debug( LDAP_DEBUG_ANY,
+                               LDAP_XSTRING(mdb_tool_entry_close) ": database %s: "
+                               "txn_commit failed: %s (%d)\n",
+                               be->be_suffix[0].bv_val, mdb_strerror(rc), rc );
+                       return -1;
+               }
+               txi = NULL;
+       }
 
        if( nholes ) {
                unsigned i;