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