From: Pierangelo Masarati Date: Fri, 16 Dec 2005 00:44:13 +0000 (+0000) Subject: reset bi_attrs after reindexing (ITS#4260) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~579 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e841c3b73b0c1b3a087fc861aaf233999d8dba28;p=openldap reset bi_attrs after reindexing (ITS#4260) --- diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index d5ffaa991d..6445e5fca9 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -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;