From: Howard Chu Date: Mon, 9 Sep 2002 04:24:38 +0000 (+0000) Subject: Fix: if slapadd was used with an un-ordered LDIF file, we can't rely on X-Git-Tag: NO_SLAP_OP_BLOCKS~1000 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9953574b47bbd73d9af5e19a9702744016bb4389;p=openldap Fix: if slapadd was used with an un-ordered LDIF file, we can't rely on entries having ascending entry IDs. Always start from the beginning of the candidate list. (This should be fine in the general case as well, since the subtree index will also have refined the candidates.) --- diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index d9fadde829..0810625ada 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -295,11 +295,9 @@ dn2entry_retry: /* need normalized dn below */ ber_dupbv( &realbase, &e->e_nname ); - /* start cursor at base entry's id - * FIXME: hack to make "" base work - * FIXME: moddn needs to assign new ID for this to work + /* start cursor at beginning of candidates. */ - cursor = e->e_id == NOID ? 1 : e->e_id; + cursor = 0; if ( e != &slap_entry_root ) { bdb_cache_return_entry_r(bdb->bi_dbenv, &bdb->bi_cache, e, &lock);