From: Howard Chu Date: Fri, 11 Oct 2019 19:47:29 +0000 (+0100) Subject: ITS#9095 insert missing commit at end of slapindex processing X-Git-Tag: OPENLDAP_REL_ENG_2_4_49~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a63b8fb8e28c04dc1c958ccdbdd7e6d76a8008;p=thirdparty%2Fopenldap.git ITS#9095 insert missing commit at end of slapindex processing --- diff --git a/servers/slapd/back-mdb/tools.c b/servers/slapd/back-mdb/tools.c index 5c2dbf053b..e459eb3501 100644 --- a/servers/slapd/back-mdb/tools.c +++ b/servers/slapd/back-mdb/tools.c @@ -194,6 +194,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;