From: Howard Chu Date: Wed, 6 Nov 2013 17:39:38 +0000 (-0800) Subject: ITS#7741 Fix entryDN index lookup X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3d1a0bb17ea27950b9a62789e4a1bf0ce4ff5f63;p=openldap ITS#7741 Fix entryDN index lookup DN notfound is authoritative, don't ignore the result --- diff --git a/servers/slapd/back-bdb/filterindex.c b/servers/slapd/back-bdb/filterindex.c index f595ebef6e..bcce1aa9a3 100644 --- a/servers/slapd/back-bdb/filterindex.c +++ b/servers/slapd/back-bdb/filterindex.c @@ -728,6 +728,10 @@ equality_candidates( if ( ei ) { bdb_cache_entryinfo_unlock( ei ); } + if ( rc == DB_NOTFOUND ) { + BDB_IDL_ZERO( ids ); + rc = 0; + } return rc; } diff --git a/servers/slapd/back-mdb/filterindex.c b/servers/slapd/back-mdb/filterindex.c index e2142e1dfe..4be30170bf 100644 --- a/servers/slapd/back-mdb/filterindex.c +++ b/servers/slapd/back-mdb/filterindex.c @@ -696,6 +696,10 @@ equality_candidates( ids[0] = 1; ids[1] = id; } + if ( rc == MDB_NOTFOUND ) { + MDB_IDL_ZERO( ids ); + rc = 0; + } return rc; }