]> git.sur5r.net Git - openldap/commitdiff
Fix its6794 test
authorHoward Chu <hyc@openldap.org>
Wed, 21 Dec 2016 14:39:47 +0000 (14:39 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 21 Dec 2016 14:39:47 +0000 (14:39 +0000)
Must NULL out indexing cursors when closing tool txn

servers/slapd/back-mdb/tools.c

index 3d7154880e798094159a7c1456120314428a7937..8a70565350dd51dd99adf5639c1ede1e41406636 100644 (file)
@@ -198,6 +198,14 @@ int mdb_tool_entry_close(
                mdb_cursor_close( cursor );
                cursor = NULL;
        }
+       {
+               struct mdb_info *mdb = be->be_private;
+               if ( mdb ) {
+                       int i;
+                       for (i=0; i<mdb->mi_nattrs; i++)
+                               mdb->mi_attrs[i]->ai_cursor = NULL;
+               }
+       }
        if( mdb_tool_txn ) {
                int rc;
                if (( rc = mdb_txn_commit( mdb_tool_txn ))) {