]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/filterindex.c
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / servers / slapd / back-bdb / filterindex.c
index 31fd91b342ea411c1a79f4330ea8d69f748e2f8b..b17ae9f45466933bb78d4fb8c6d16aeec8934f6d 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2008 The OpenLDAP Foundation.
+ * Copyright 2000-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -720,10 +720,14 @@ equality_candidates(
        if ( ava->aa_desc == slap_schema.si_ad_entryDN ) {
                EntryInfo *ei = NULL;
                rc = bdb_cache_find_ndn( op, rtxn, &ava->aa_value, &ei );
-               if ( rc == LDAP_SUCCESS )
-                       bdb_idl_insert( ids, ei->bei_id );
-               if ( ei )
+               if ( rc == LDAP_SUCCESS ) {
+                       /* exactly one ID can match */
+                       ids[0] = 1;
+                       ids[1] = ei->bei_id;
+               }
+               if ( ei ) {
                        bdb_cache_entryinfo_unlock( ei );
+               }
                return rc;
        }