reset bi_attrs after reindexing (ITS#4260)

This commit is contained in:
Pierangelo Masarati 2005-12-16 00:44:13 +00:00
parent 53d41587ad
commit e841c3b73b

View 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;