mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
Update handling of AND/OR indexing where element is undefined.
This commit is contained in:
parent
d9c93faac8
commit
93a45a02aa
2 changed files with 35 additions and 14 deletions
|
|
@ -158,8 +158,11 @@ list_candidates(
|
|||
rc = bdb_filter_candidates( be, f, save, tmp );
|
||||
|
||||
if ( rc != 0 ) {
|
||||
/* Error: treat as undefined */
|
||||
continue;
|
||||
if ( ftype == LDAP_FILTER_AND ) {
|
||||
rc = 0;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ftype == LDAP_FILTER_AND ) {
|
||||
|
|
@ -171,16 +174,25 @@ list_candidates(
|
|||
BDB_IDL_ALL( bdb, save );
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(LDAP_PVT_THREAD_STACK_SIZE) || (LDAP_PVT_THREAD_STACK_SIZE == 0)
|
||||
free(save);
|
||||
#endif
|
||||
|
||||
Debug( LDAP_DEBUG_FILTER,
|
||||
"<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
|
||||
(long) ids[0],
|
||||
(long) BDB_IDL_FIRST(ids),
|
||||
(long) BDB_IDL_LAST(ids) );
|
||||
return 0;
|
||||
if( rc ) {
|
||||
Debug( LDAP_DEBUG_FILTER,
|
||||
"<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
|
||||
(long) ids[0],
|
||||
(long) BDB_IDL_FIRST(ids),
|
||||
(long) BDB_IDL_LAST(ids) );
|
||||
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_FILTER,
|
||||
"<= bdb_list_candidates: undefined rc=%d\n",
|
||||
rc, 0, 0 );
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -247,7 +247,9 @@ bdb_search(
|
|||
ber_dupbv( &realbase, &e->e_nname );
|
||||
|
||||
/* start cursor at base entry's id
|
||||
* FIXME: hack to make "" base work */
|
||||
* FIXME: hack to make "" base work
|
||||
* FIXME: moddn needs to assign new ID for this to work
|
||||
*/
|
||||
cursor = e->e_id == NOID ? 1 : e->e_id;
|
||||
|
||||
if ( e != &slap_entry_root ) {
|
||||
|
|
@ -627,11 +629,18 @@ static int search_candidates(
|
|||
|
||||
rc = bdb_filter_candidates( be, &f, ids, tmp );
|
||||
|
||||
Debug(LDAP_DEBUG_TRACE,
|
||||
"bdb_search_candidates: id=%ld first=%ld last=%ld\n",
|
||||
(long) ids[0],
|
||||
(long) BDB_IDL_FIRST(ids),
|
||||
(long) BDB_IDL_LAST(ids) );
|
||||
if( rc ) {
|
||||
Debug(LDAP_DEBUG_TRACE,
|
||||
"bdb_search_candidates: failed (rc=%d)\n",
|
||||
rc, NULL, NULL );
|
||||
|
||||
} else {
|
||||
Debug(LDAP_DEBUG_TRACE,
|
||||
"bdb_search_candidates: id=%ld first=%ld last=%ld\n",
|
||||
(long) ids[0],
|
||||
(long) BDB_IDL_FIRST(ids),
|
||||
(long) BDB_IDL_LAST(ids) );
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue