]> git.sur5r.net Git - openldap/commitdiff
reset bi_attrs after reindexing (ITS#4260)
authorPierangelo Masarati <ando@openldap.org>
Fri, 16 Dec 2005 00:44:13 +0000 (00:44 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 16 Dec 2005 00:44:13 +0000 (00:44 +0000)
servers/slapd/back-bdb/config.c

index d5ffaa991d66126d17dae588fca9f999481e9c15..6445e5fca947186bbf55bf40078c6c6ca3598600 100644 (file)
@@ -189,6 +189,7 @@ bdb_online_index( void *ctx, void *arg )
        ID id, nid;
        EntryInfo *ei;
        int rc, getnext = 1;
+       int i;
 
        connection_fake_init( &conn, op, ctx );
 
@@ -270,6 +271,14 @@ bdb_online_index( void *ctx, void *arg )
                getnext = 1;
        }
 
+       for ( i = 0; i < bdb->bi_nattrs; i++ ) {
+               if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING ) {
+                       continue;
+               }
+               bdb->bi_attrs[ i ]->ai_indexmask = bdb->bi_attrs[ i ]->ai_newmask;
+               bdb->bi_attrs[ i ]->ai_newmask = 0;
+       }
+
        ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
        ldap_pvt_runqueue_stoptask( &slapd_rq, rtask );
        bdb->bi_index_task = NULL;