Filter *f,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
int rc = -1;
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
case LDAP_FILTER_NOT:
/* no indexing to support NOT filters */
Debug( LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
+ BDB_IDL_ALL( bdb, ids );
+ rc = 0;
break;
case LDAP_FILTER_AND:
default:
Debug( LDAP_DEBUG_FILTER, "\tUNKNOWN %d\n",
f->f_choice, 0, 0 );
+ BDB_IDL_ALL( bdb, ids );
}
Debug( LDAP_DEBUG_FILTER,
int ftype,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
int rc = 0;
Filter *f;
ID tmp[BDB_IDL_UM_SIZE];
i2 = save;
i3 = tmp;
+ BDB_IDL_ZERO( tmp );
+
for ( f = flist; f != NULL; f = f->f_next ) {
- BDB_IDL_ZERO( i1 );
+ BDB_IDL_ZERO( i2 );
rc = bdb_filter_candidates( be, f, i2 );
if ( rc != 0 ) {
AttributeDescription *desc,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db;
int rc;
slap_mask_t mask;
struct berval prefix = {0};
Debug( LDAP_DEBUG_TRACE, "=> bdb_presence_candidates\n", 0, 0, 0 );
- BDB_IDL_ZERO( ids );
+ BDB_IDL_ALL( bdb, ids );
rc = bdb_index_param( be, desc, LDAP_FILTER_PRESENT,
&db, &mask, &prefix );
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: index_param returned=%d\n",
rc, 0, 0 );
- return rc;
+ return 0;
}
if( db == NULL ) {
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: not indexed\n",
0, 0, 0 );
- rc = -1;
- goto done;
+ return 0;
}
if( prefix.bv_val == NULL ) {
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: no prefix\n",
0, 0, 0 );
- rc = -1;
- goto done;
+ return 0;
}
rc = bdb_key_read( be, db, NULL, &prefix, ids );
AttributeAssertion *ava,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db;
int i;
int rc;
ID *i1, *i2, *i3, *t;
Debug( LDAP_DEBUG_TRACE, "=> bdb_equality_candidates\n", 0, 0, 0 );
- BDB_IDL_ZERO( ids );
+ BDB_IDL_ALL( bdb, ids );
rc = bdb_index_param( be, ava->aa_desc, LDAP_FILTER_EQUALITY,
&db, &mask, &prefix );
i1 = ids;
i2 = save;
i3 = tmp;
+
+ BDB_IDL_ALL( bdb, tmp );
+
for ( i= 0; keys[i] != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, keys[i], i2 );
AttributeAssertion *ava,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db;
int i;
int rc;
ID *i1, *i2, *i3, *t;
Debug( LDAP_DEBUG_TRACE, "=> bdb_approx_candidates\n", 0, 0, 0 );
- BDB_IDL_ZERO( ids );
+ BDB_IDL_ALL( bdb, ids );
rc = bdb_index_param( be, ava->aa_desc, LDAP_FILTER_APPROX,
&db, &mask, &prefix );
i1 = ids;
i2 = save;
i3 = tmp;
+
+ BDB_IDL_ALL( bdb, tmp );
+
for ( i= 0; keys[i] != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, keys[i], i2 );
SubstringsAssertion *sub,
ID *ids )
{
+ struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db;
int i;
int rc;
ID *i1, *i2, *i3, *t;
Debug( LDAP_DEBUG_TRACE, "=> bdb_substring_candidates\n", 0, 0, 0 );
- BDB_IDL_ZERO( ids );
+ BDB_IDL_ALL( bdb, ids );
rc = bdb_index_param( be, sub->sa_desc, LDAP_FILTER_SUBSTRINGS,
&db, &mask, &prefix );
i1 = ids;
i2 = save;
i3 = tmp;
+
+ BDB_IDL_ALL( bdb, tmp );
+
for ( i= 0; keys[i] != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, keys[i], i2 );