]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Apply filter index bug fix to ldbm (from HEAD)
authorKurt Zeilenga <kurt@openldap.org>
Tue, 29 Apr 2003 03:21:40 +0000 (03:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 29 Apr 2003 03:21:40 +0000 (03:21 +0000)
CHANGES
servers/slapd/back-ldbm/filterindex.c

diff --git a/CHANGES b/CHANGES
index 58606be69b262acc0bbf66afa4d6eba51072e67a..6e95e9d6cdc180254afe80738afb9b2560bbd94c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,7 +8,7 @@ OpenLDAP 2.1.18 Engineering
        Fixed slapd ACL group DN crash (ITS#2467)
        Fixed slapd substring normalization bug (ITS#2468)
        Fixed back-bdb search filter empty value bug (ITS#2453)
-       Fixed back-bdb filter index computed/undefined bugs (ITS#2449)
+       Fixed back-bdb/ldbm filter index computed/undefined bugs (ITS#2449)
        Fixed SASL interactive free bug (ITS#2423)
        Fixed libldap ldap_host_connected_to portability bug (ITS#2459)
        Fixed liblber multi-value decode bug (ITS#2458)
index ff07968cd9b505e6edf0b394ff5851387213f42b..c7e67925529759c841dd873dbad8b09ef5bc55fd 100644 (file)
@@ -47,6 +47,23 @@ filter_candidates(
 
        result = NULL;
        switch ( f->f_choice ) {
+       case SLAPD_FILTER_COMPUTED:
+               switch( f->f_result ) {
+               case SLAPD_COMPARE_UNDEFINED:
+               /* This technically is not the same as FALSE, but it
+                * certainly will produce no matches. list_candidates
+                * will take care of ignoring this filter.
+                */
+               /* FALLTHRU */
+               case LDAP_COMPARE_FALSE:
+                       result = NULL;
+                       break;
+               case LDAP_COMPARE_TRUE:
+                       result = idl_allids( be );
+                       break;
+               }
+               break;
+
        case SLAPD_FILTER_DN_ONE:
 #ifdef NEW_LOGGING
                LDAP_LOG( FILTER, DETAIL1, 
@@ -692,6 +709,10 @@ list_candidates(
 
        idl = NULL;
        for ( f = flist; f != NULL; f = f->f_next ) {
+               if ( f->f_choice == SLAPD_FILTER_COMPUTED &&
+                    f->f_result == SLAPD_COMPARE_UNDEFINED ) {
+                       continue;
+               }
                if ( (tmp = filter_candidates( be, f )) == NULL &&
                    ftype == LDAP_FILTER_AND ) {
 #ifdef NEW_LOGGING