]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/index.c
ITS#3226: Clear attribute flags after schema_check failed
[openldap] / servers / slapd / back-bdb / index.c
index 554b45e3ddaa95d89c3d1e63495c3c7fcf2050e9..e1f09f6fdc9becf71b4a457e5fba1e38dea59e6c 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2003 The OpenLDAP Foundation.
+ * Copyright 2000-2004 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -121,9 +121,14 @@ int bdb_index_param(
                break;
 
        case LDAP_FILTER_APPROX:
-               if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
-                       goto done;
+               if ( desc->ad_type->sat_approx ) {
+                       if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
+                               goto done;
+                       }
+                       break;
                }
+
+               /* Use EQUALITY rule and index for approximate match */
                /* fall thru */
 
        case LDAP_FILTER_EQUALITY: