]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Fix its6794 test
authorHoward Chu <hyc@openldap.org>
Wed, 21 Dec 2016 14:39:47 +0000 (14:39 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 28 Dec 2016 18:53:44 +0000 (10:53 -0800)
Must NULL out indexing cursors when closing tool txn

servers/slapd/back-mdb/tools.c

index 0d3469d85944b0204f6d78f9200139916f1d75e3..2dfa22b8299f59ea76ecf140ec7ec63de5dd3e10 100644 (file)
@@ -174,6 +174,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;
                MDB_TOOL_IDL_FLUSH( be, mdb_tool_txn );