Commit ab519103 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#5037 from HEAD, index warning

parent 1ac95308
......@@ -328,9 +328,6 @@ comp_equality_candidates (
if( rc != LDAP_SUCCESS ) {
return 0;
}
if ( db == NULL ) {
return 0;
}
if( !mr ) {
return 0;
......@@ -572,19 +569,19 @@ presence_candidates(
rc = bdb_index_param( op->o_bd, desc, LDAP_FILTER_PRESENT,
&db, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
if( rc == LDAP_INAPPROPRIATE_MATCHING ) {
/* not indexed */
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: (%s) index_param "
"returned=%d\n",
desc->ad_cname.bv_val, rc, 0 );
"<= bdb_presence_candidates: (%s) not indexed\n",
desc->ad_cname.bv_val, 0, 0 );
return 0;
}
if( db == NULL ) {
/* not indexed */
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: (%s) not indexed\n",
desc->ad_cname.bv_val, 0, 0 );
"<= bdb_presence_candidates: (%s) index_param "
"returned=%d\n",
desc->ad_cname.bv_val, rc, 0 );
return 0;
}
......@@ -642,18 +639,18 @@ equality_candidates(
rc = bdb_index_param( op->o_bd, ava->aa_desc, LDAP_FILTER_EQUALITY,
&db, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_equality_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
"<= bdb_equality_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
return 0;
}
if ( db == NULL ) {
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_equality_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
"<= bdb_equality_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
return 0;
}
......@@ -758,18 +755,18 @@ approx_candidates(
rc = bdb_index_param( op->o_bd, ava->aa_desc, LDAP_FILTER_APPROX,
&db, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_approx_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
"<= bdb_approx_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
return 0;
}
if ( db == NULL ) {
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_approx_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
"<= bdb_approx_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
return 0;
}
......@@ -877,18 +874,18 @@ substring_candidates(
rc = bdb_index_param( op->o_bd, sub->sa_desc, LDAP_FILTER_SUBSTRINGS,
&db, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_substring_candidates: (%s) "
"index_param failed (%d)\n",
sub->sa_desc->ad_cname.bv_val, rc, 0 );
"<= bdb_substring_candidates: (%s) not indexed\n",
sub->sa_desc->ad_cname.bv_val, 0, 0 );
return 0;
}
if ( db == NULL ) {
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_substring_candidates: (%s) not indexed\n",
sub->sa_desc->ad_cname.bv_val, 0, 0 );
"<= bdb_substring_candidates: (%s) "
"index_param failed (%d)\n",
sub->sa_desc->ad_cname.bv_val, rc, 0 );
return 0;
}
......@@ -993,18 +990,18 @@ inequality_candidates(
rc = bdb_index_param( op->o_bd, ava->aa_desc, LDAP_FILTER_EQUALITY,
&db, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_inequality_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
"<= bdb_inequality_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
return 0;
}
if ( db == NULL ) {
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"<= bdb_inequality_candidates: (%s) not indexed\n",
ava->aa_desc->ad_cname.bv_val, 0, 0 );
"<= bdb_inequality_candidates: (%s) "
"index_param failed (%d)\n",
ava->aa_desc->ad_cname.bv_val, rc, 0 );
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment