rc = bdb_key_read( be, db, NULL, &prefix, ids );
if( rc == DB_NOTFOUND ) {
+ BDB_IDL_ZERO( ids );
rc = 0;
-
} else if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presense_candidates: key read failed (%d)\n",
for ( i= 0; keys[i].bv_val != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, &keys[i], tmp );
- if( rc != LDAP_SUCCESS ) {
+ if( rc == DB_NOTFOUND ) {
+ BDB_IDL_ZERO( ids );
+ rc = 0;
+ } else if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates key read failed (%d)\n",
rc, 0, 0 );
for ( i= 0; keys[i].bv_val != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, &keys[i], tmp );
- if( rc != LDAP_SUCCESS ) {
+ if( rc == DB_NOTFOUND ) {
+ BDB_IDL_ZERO( ids );
+ rc = 0;
+ break;
+ } else if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "<= bdb_approx_candidates key read failed (%d)\n",
rc, 0, 0 );
break;
for ( i= 0; keys[i].bv_val != NULL; i++ ) {
rc = bdb_key_read( be, db, NULL, &keys[i], tmp );
- if( rc != LDAP_SUCCESS ) {
+ if( rc == DB_NOTFOUND ) {
+ BDB_IDL_ZERO( ids );
+ rc = 0;
+ break;
+ } else if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates key read failed (%d)\n",
rc, 0, 0 );
break;