]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-mdb/filterindex.c
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / servers / slapd / back-mdb / filterindex.c
index cf9729233851d5d4a4694d1cbe0a9bfeb2a4d123..58c1cc89d59ef5dfe61b5aee684a9599869958b5 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2012 The OpenLDAP Foundation.
+ * Copyright 2000-2014 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -489,7 +489,7 @@ ext_candidates(
                MDB_IDL_ZERO( ids );
                if ( mra->ma_rule == slap_schema.si_mr_distinguishedNameMatch ) {
 base:
-                       rc = mdb_dn2id( op, rtxn, NULL, &mra->ma_value, &id, NULL, NULL );
+                       rc = mdb_dn2id( op, rtxn, NULL, &mra->ma_value, &id, NULL, NULL, NULL );
                        if ( rc == MDB_SUCCESS ) {
                                mdb_idl_insert( ids, id );
                        }
@@ -690,12 +690,16 @@ equality_candidates(
 
        if ( ava->aa_desc == slap_schema.si_ad_entryDN ) {
                ID id;
-               rc = mdb_dn2id( op, rtxn, NULL, &ava->aa_value, &id, NULL, NULL );
+               rc = mdb_dn2id( op, rtxn, NULL, &ava->aa_value, &id, NULL, NULL, NULL );
                if ( rc == LDAP_SUCCESS ) {
                        /* exactly one ID can match */
                        ids[0] = 1;
                        ids[1] = id;
                }
+               if ( rc == MDB_NOTFOUND ) {
+                       MDB_IDL_ZERO( ids );
+                       rc = 0;
+               }
                return rc;
        }