/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#endif
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
+ if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
+ BDB_IDL_ZERO( ids );
+ goto out;
+ }
+
switch ( f->f_choice ) {
case SLAPD_FILTER_COMPUTED:
switch( f->f_result ) {
}
}
+out:
Debug( LDAP_DEBUG_FILTER,
"<= bdb_filter_candidates: id=%ld first=%ld last=%ld\n",
(long) ids[0],
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
DB *db;
- int i;
int rc;
slap_mask_t mask;
struct berval prefix = {0, NULL};
bdb_idl_union( ids, tmp );
- if( BDB_IDL_IS_ZERO( ids ) )
+ if( op->ors_limit && op->ors_limit->lms_s_unchecked != -1 &&
+ BDB_IDL_N( ids ) >= (unsigned) op->ors_limit->lms_s_unchecked ) {
+ cursor->c_close( cursor );
break;
- i++;
+ }
}
ber_bvarray_free_x( keys, op->o_tmpmemctx );