From: Howard Chu Date: Fri, 20 Jul 2007 14:42:31 +0000 (+0000) Subject: ITS#5052 fix Quick mode erroneously indexing ID#0 X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~319 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fb5568bd4553c6f1945d297f803198fdd2364a2d;p=openldap ITS#5052 fix Quick mode erroneously indexing ID#0 --- diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index 94d181de7e..3bf4fd136e 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -435,6 +435,10 @@ int bdb_index_recrun( AttrList *al; int i, rc = 0; + /* Never index ID 0 */ + if ( id == 0 ) + return 0; + for (i=base; ibi_nattrs; i+=slap_tool_thread_max) { ir = ir0 + i; if ( !ir->ai ) continue; @@ -472,6 +476,10 @@ bdb_index_entry( struct berval value = {0}; #endif + /* Never index ID 0 */ + if ( e->e_id == 0 ) + return 0; + Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n", opid == SLAP_INDEX_DELETE_OP ? "del" : "add", (long) e->e_id, e->e_dn );