]> git.sur5r.net Git - openldap/commitdiff
ITS#7741 Fix entryDN index lookup
authorHoward Chu <hyc@openldap.org>
Wed, 6 Nov 2013 17:39:38 +0000 (09:39 -0800)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 6 Nov 2013 18:07:26 +0000 (10:07 -0800)
DN notfound is authoritative, don't ignore the result

servers/slapd/back-bdb/filterindex.c
servers/slapd/back-mdb/filterindex.c

index f595ebef6e833c8845f7539ca8511687b8391cb0..bcce1aa9a33bf7c7f4aa4cc010d39930932360d1 100644 (file)
@@ -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;
        }
 
index e2142e1dfe721d4fc471d39a36244945b8cdd73b..4be30170bf79fe0869ea638715066c2c0dab6bc2 100644 (file)
@@ -696,6 +696,10 @@ equality_candidates(
                        ids[0] = 1;
                        ids[1] = id;
                }
+               if ( rc == MDB_NOTFOUND ) {
+                       MDB_IDL_ZERO( ids );
+                       rc = 0;
+               }
                return rc;
        }