2001-10-04 10:55:09 +08:00
|
|
|
/* index.c - routines for dealing with attribute indexes */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
2003-01-04 04:20:47 +08:00
|
|
|
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
|
2001-10-04 10:55:09 +08:00
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "portable.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include <ac/string.h>
|
|
|
|
#include <ac/socket.h>
|
|
|
|
|
|
|
|
#include "slap.h"
|
|
|
|
#include "back-bdb.h"
|
2001-12-16 22:21:47 +08:00
|
|
|
#include "lutil_hash.h"
|
|
|
|
|
|
|
|
static char presence_keyval[LUTIL_HASH_BYTES] = {0,0,0,1};
|
2001-12-24 14:36:44 +08:00
|
|
|
static struct berval presence_key = {LUTIL_HASH_BYTES, presence_keyval};
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
static slap_mask_t index_mask(
|
|
|
|
Backend *be,
|
|
|
|
AttributeDescription *desc,
|
2001-11-16 16:18:58 +08:00
|
|
|
struct berval *atname )
|
2001-10-04 10:55:09 +08:00
|
|
|
{
|
|
|
|
AttributeType *at;
|
|
|
|
slap_mask_t mask = 0;
|
|
|
|
|
2001-11-16 16:18:58 +08:00
|
|
|
bdb_attr_mask( be->be_private, desc, &mask );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( mask ) {
|
2001-11-16 16:18:58 +08:00
|
|
|
*atname = desc->ad_cname;
|
2001-10-04 10:55:09 +08:00
|
|
|
return mask;
|
|
|
|
}
|
|
|
|
|
2002-12-14 03:15:20 +08:00
|
|
|
/* If there is a tagging option, did we ever index the base
|
2001-11-16 16:18:58 +08:00
|
|
|
* type? If so, check for mask, otherwise it's not there.
|
|
|
|
*/
|
2002-12-14 03:15:20 +08:00
|
|
|
if( slap_ad_is_tagged( desc ) && desc != desc->ad_type->sat_ad ) {
|
|
|
|
/* has tagging option */
|
2001-11-16 16:18:58 +08:00
|
|
|
bdb_attr_mask( be->be_private, desc->ad_type->sat_ad, &mask );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2002-12-14 03:15:20 +08:00
|
|
|
if ( mask && ( mask ^ SLAP_INDEX_NOTAGS ) ) {
|
2001-10-04 10:55:09 +08:00
|
|
|
*atname = desc->ad_type->sat_cname;
|
|
|
|
return mask;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* see if supertype defined mask for its subtypes */
|
|
|
|
for( at = desc->ad_type; at != NULL ; at = at->sat_sup ) {
|
2001-11-16 16:18:58 +08:00
|
|
|
/* If no AD, we've never indexed this type */
|
2001-12-05 08:06:03 +08:00
|
|
|
if ( !at->sat_ad ) continue;
|
2001-11-16 16:18:58 +08:00
|
|
|
|
|
|
|
bdb_attr_mask( be->be_private, at->sat_ad, &mask );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2002-01-15 04:26:51 +08:00
|
|
|
if ( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) {
|
|
|
|
*atname = at->sat_cname;
|
|
|
|
return mask;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-01-14 07:23:23 +08:00
|
|
|
int bdb_index_is_indexed(
|
|
|
|
Backend *be,
|
|
|
|
AttributeDescription *desc )
|
|
|
|
{
|
|
|
|
slap_mask_t mask;
|
|
|
|
struct berval prefix;
|
|
|
|
|
2003-03-26 02:17:34 +08:00
|
|
|
mask = index_mask( be, desc, &prefix );
|
2002-01-14 07:23:23 +08:00
|
|
|
|
|
|
|
if( mask == 0 ) {
|
|
|
|
return LDAP_INAPPROPRIATE_MATCHING;
|
|
|
|
}
|
|
|
|
|
2002-01-15 15:29:15 +08:00
|
|
|
return LDAP_SUCCESS;
|
2002-01-14 07:23:23 +08:00
|
|
|
}
|
|
|
|
|
2001-10-04 10:55:09 +08:00
|
|
|
int bdb_index_param(
|
|
|
|
Backend *be,
|
|
|
|
AttributeDescription *desc,
|
|
|
|
int ftype,
|
2001-10-14 00:55:54 +08:00
|
|
|
DB **dbp,
|
2001-10-04 10:55:09 +08:00
|
|
|
slap_mask_t *maskp,
|
2001-11-16 16:18:58 +08:00
|
|
|
struct berval *prefixp )
|
2001-10-04 10:55:09 +08:00
|
|
|
{
|
2001-10-14 00:55:54 +08:00
|
|
|
int rc;
|
2001-10-04 10:55:09 +08:00
|
|
|
slap_mask_t mask;
|
2001-10-14 00:55:54 +08:00
|
|
|
DB *db;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2003-03-26 02:17:34 +08:00
|
|
|
mask = index_mask( be, desc, prefixp );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( mask == 0 ) {
|
|
|
|
return LDAP_INAPPROPRIATE_MATCHING;
|
|
|
|
}
|
|
|
|
|
2003-03-26 02:17:34 +08:00
|
|
|
rc = bdb_db_cache( be, NULL, prefixp->bv_val, &db );
|
2001-10-14 00:55:54 +08:00
|
|
|
|
|
|
|
if( rc != LDAP_SUCCESS ) {
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2001-12-05 08:06:03 +08:00
|
|
|
switch( ftype ) {
|
2001-10-04 10:55:09 +08:00
|
|
|
case LDAP_FILTER_PRESENT:
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
|
2002-08-09 01:27:50 +08:00
|
|
|
*prefixp = presence_key;
|
2001-10-04 10:55:09 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LDAP_FILTER_APPROX:
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
/* fall thru */
|
|
|
|
|
|
|
|
case LDAP_FILTER_EQUALITY:
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) ) {
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LDAP_FILTER_SUBSTRINGS:
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) ) {
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return LDAP_OTHER;
|
|
|
|
}
|
|
|
|
|
|
|
|
return LDAP_INAPPROPRIATE_MATCHING;
|
|
|
|
|
|
|
|
done:
|
2001-10-14 00:55:54 +08:00
|
|
|
*dbp = db;
|
2001-10-04 10:55:09 +08:00
|
|
|
*maskp = mask;
|
|
|
|
return LDAP_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int indexer(
|
2003-04-11 09:29:28 +08:00
|
|
|
Operation *op,
|
2001-10-04 10:55:09 +08:00
|
|
|
DB_TXN *txn,
|
2003-04-12 20:19:57 +08:00
|
|
|
AttributeDescription *ad,
|
2001-11-16 16:18:58 +08:00
|
|
|
struct berval *atname,
|
2002-01-14 09:43:17 +08:00
|
|
|
BerVarray vals,
|
2001-10-04 10:55:09 +08:00
|
|
|
ID id,
|
2003-04-11 09:29:28 +08:00
|
|
|
int opid,
|
2001-10-04 10:55:09 +08:00
|
|
|
slap_mask_t mask )
|
|
|
|
{
|
|
|
|
int rc, i;
|
|
|
|
const char *text;
|
|
|
|
DB *db;
|
2001-12-29 23:01:10 +08:00
|
|
|
struct berval *keys;
|
2003-04-11 09:29:28 +08:00
|
|
|
void *mark;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
assert( mask );
|
|
|
|
|
2003-04-11 09:29:28 +08:00
|
|
|
rc = bdb_db_cache( op->o_bd, txn, atname->bv_val, &db );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if ( rc != LDAP_SUCCESS ) {
|
|
|
|
#ifdef NEW_LOGGING
|
2002-07-12 04:33:24 +08:00
|
|
|
LDAP_LOG( INDEX, ERR,
|
2003-03-26 02:17:34 +08:00
|
|
|
"bdb_index_read: Could not open DB %s\n",
|
|
|
|
atname->bv_val, 0, 0 );
|
2001-10-04 10:55:09 +08:00
|
|
|
#else
|
|
|
|
Debug( LDAP_DEBUG_ANY,
|
2003-03-26 02:17:34 +08:00
|
|
|
"bdb_index_read: Could not open DB %s\n",
|
|
|
|
atname->bv_val, 0, 0 );
|
2001-10-04 10:55:09 +08:00
|
|
|
#endif
|
|
|
|
return LDAP_OTHER;
|
|
|
|
}
|
|
|
|
|
2003-04-11 09:29:28 +08:00
|
|
|
mark = sl_mark(op->o_tmpmemctx);
|
|
|
|
|
2001-10-04 10:55:09 +08:00
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
rc = bdb_key_change( op->o_bd, db, txn, &presence_key, id, opid );
|
2001-10-06 01:00:21 +08:00
|
|
|
if( rc ) {
|
|
|
|
goto done;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) ) {
|
|
|
|
rc = ad->ad_type->sat_equality->smr_indexer(
|
|
|
|
LDAP_FILTER_EQUALITY,
|
|
|
|
mask,
|
|
|
|
ad->ad_type->sat_syntax,
|
|
|
|
ad->ad_type->sat_equality,
|
2003-04-11 09:29:28 +08:00
|
|
|
atname, vals, &keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( rc == LDAP_SUCCESS && keys != NULL ) {
|
2001-12-29 23:01:10 +08:00
|
|
|
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
rc = bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
|
2001-10-06 01:00:21 +08:00
|
|
|
if( rc ) {
|
2003-04-14 00:15:52 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-06 01:00:21 +08:00
|
|
|
goto done;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2003-04-11 09:29:28 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2001-10-06 01:00:21 +08:00
|
|
|
rc = LDAP_SUCCESS;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
|
|
|
|
rc = ad->ad_type->sat_approx->smr_indexer(
|
|
|
|
LDAP_FILTER_APPROX,
|
|
|
|
mask,
|
|
|
|
ad->ad_type->sat_syntax,
|
|
|
|
ad->ad_type->sat_approx,
|
2003-04-11 09:29:28 +08:00
|
|
|
atname, vals, &keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( rc == LDAP_SUCCESS && keys != NULL ) {
|
2001-12-29 23:01:10 +08:00
|
|
|
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
rc = bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
|
2001-10-06 01:00:21 +08:00
|
|
|
if( rc ) {
|
2003-04-14 00:15:52 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-06 01:00:21 +08:00
|
|
|
goto done;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2003-04-11 09:29:28 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2001-10-06 01:00:21 +08:00
|
|
|
|
|
|
|
rc = LDAP_SUCCESS;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) ) {
|
|
|
|
rc = ad->ad_type->sat_substr->smr_indexer(
|
|
|
|
LDAP_FILTER_SUBSTRINGS,
|
|
|
|
mask,
|
|
|
|
ad->ad_type->sat_syntax,
|
|
|
|
ad->ad_type->sat_substr,
|
2003-04-11 09:29:28 +08:00
|
|
|
atname, vals, &keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( rc == LDAP_SUCCESS && keys != NULL ) {
|
2001-12-29 23:01:10 +08:00
|
|
|
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
|
2001-10-06 01:00:21 +08:00
|
|
|
if( rc ) {
|
2003-04-14 00:15:52 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-06 01:00:21 +08:00
|
|
|
goto done;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2003-04-11 09:29:28 +08:00
|
|
|
ber_bvarray_free_x( keys, op->o_tmpmemctx );
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
2001-10-06 01:00:21 +08:00
|
|
|
|
|
|
|
rc = LDAP_SUCCESS;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
2001-10-06 01:00:21 +08:00
|
|
|
done:
|
2003-04-11 09:29:28 +08:00
|
|
|
sl_release( mark, op->o_tmpmemctx );
|
2001-10-06 01:00:21 +08:00
|
|
|
return rc;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static int index_at_values(
|
2003-04-11 09:29:28 +08:00
|
|
|
Operation *op,
|
2001-10-04 10:55:09 +08:00
|
|
|
DB_TXN *txn,
|
2003-04-12 20:19:57 +08:00
|
|
|
AttributeDescription *ad,
|
2001-10-04 10:55:09 +08:00
|
|
|
AttributeType *type,
|
2002-12-14 03:15:20 +08:00
|
|
|
struct berval *tags,
|
2002-01-14 09:43:17 +08:00
|
|
|
BerVarray vals,
|
2001-10-04 10:55:09 +08:00
|
|
|
ID id,
|
2003-04-11 09:29:28 +08:00
|
|
|
int opid )
|
2001-10-04 10:55:09 +08:00
|
|
|
{
|
|
|
|
int rc;
|
2001-11-16 16:18:58 +08:00
|
|
|
slap_mask_t mask = 0;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( type->sat_sup ) {
|
|
|
|
/* recurse */
|
2003-04-12 20:19:57 +08:00
|
|
|
rc = index_at_values( op, txn, NULL,
|
2002-12-14 03:15:20 +08:00
|
|
|
type->sat_sup, tags,
|
2003-04-11 09:29:28 +08:00
|
|
|
vals, id, opid );
|
2001-10-06 01:00:21 +08:00
|
|
|
|
|
|
|
if( rc ) return rc;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
2001-11-16 16:18:58 +08:00
|
|
|
/* If this type has no AD, we've never used it before */
|
2001-12-05 08:06:03 +08:00
|
|
|
if( type->sat_ad ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
bdb_attr_mask( op->o_bd->be_private, type->sat_ad, &mask );
|
2003-04-12 20:19:57 +08:00
|
|
|
ad = type->sat_ad;
|
2001-12-05 08:06:03 +08:00
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( mask ) {
|
2003-04-12 20:19:57 +08:00
|
|
|
rc = indexer( op, txn, ad, &type->sat_cname,
|
2003-04-11 09:29:28 +08:00
|
|
|
vals, id, opid,
|
2001-10-04 10:55:09 +08:00
|
|
|
mask );
|
2001-10-06 01:00:21 +08:00
|
|
|
|
|
|
|
if( rc ) return rc;
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
|
2002-12-14 03:15:20 +08:00
|
|
|
if( tags->bv_len ) {
|
2001-11-16 16:18:58 +08:00
|
|
|
AttributeDescription *desc;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2002-01-15 09:50:09 +08:00
|
|
|
mask = 0;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2002-12-14 03:15:20 +08:00
|
|
|
desc = ad_find_tags( type, tags );
|
2001-12-05 08:06:03 +08:00
|
|
|
if( desc ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
bdb_attr_mask( op->o_bd->be_private, desc, &mask );
|
2001-12-05 08:06:03 +08:00
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
|
2002-01-15 09:50:09 +08:00
|
|
|
if( mask ) {
|
2003-04-12 20:19:57 +08:00
|
|
|
rc = indexer( op, txn, desc, &desc->ad_cname,
|
2003-04-11 09:29:28 +08:00
|
|
|
vals, id, opid,
|
2001-11-16 16:18:58 +08:00
|
|
|
mask );
|
2001-10-06 01:00:21 +08:00
|
|
|
|
|
|
|
if( rc ) {
|
|
|
|
return rc;
|
|
|
|
}
|
2001-10-04 10:55:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return LDAP_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
int bdb_index_values(
|
2003-04-11 09:29:28 +08:00
|
|
|
Operation *op,
|
2001-10-04 10:55:09 +08:00
|
|
|
DB_TXN *txn,
|
|
|
|
AttributeDescription *desc,
|
2002-01-14 09:43:17 +08:00
|
|
|
BerVarray vals,
|
2001-10-04 10:55:09 +08:00
|
|
|
ID id,
|
2003-04-11 09:29:28 +08:00
|
|
|
int opid )
|
2001-10-04 10:55:09 +08:00
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
2003-04-12 20:19:57 +08:00
|
|
|
rc = index_at_values( op, txn, desc,
|
2002-12-14 03:15:20 +08:00
|
|
|
desc->ad_type, &desc->ad_tags,
|
2003-04-11 09:29:28 +08:00
|
|
|
vals, id, opid );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
bdb_index_entry(
|
2003-04-11 09:29:28 +08:00
|
|
|
Operation *op,
|
2001-10-04 10:55:09 +08:00
|
|
|
DB_TXN *txn,
|
2003-04-11 09:29:28 +08:00
|
|
|
int opid,
|
2003-03-30 17:03:54 +08:00
|
|
|
Entry *e )
|
2001-10-04 10:55:09 +08:00
|
|
|
{
|
|
|
|
int rc;
|
2003-03-30 17:03:54 +08:00
|
|
|
Attribute *ap = e->e_attrs;
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
#ifdef NEW_LOGGING
|
2002-07-12 04:33:24 +08:00
|
|
|
LDAP_LOG( INDEX, ENTRY, "index_entry: %s (%s) %ld\n",
|
2003-04-11 09:29:28 +08:00
|
|
|
opid == SLAP_INDEX_ADD_OP ? "add" : "del", e->e_dn, (long) e->e_id );
|
2001-10-04 10:55:09 +08:00
|
|
|
#else
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
|
2003-04-11 09:29:28 +08:00
|
|
|
opid == SLAP_INDEX_ADD_OP ? "add" : "del",
|
2001-10-14 00:55:54 +08:00
|
|
|
(long) e->e_id, e->e_dn );
|
2001-10-04 10:55:09 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* add each attribute to the indexes */
|
|
|
|
for ( ; ap != NULL; ap = ap->a_next ) {
|
2003-04-11 09:29:28 +08:00
|
|
|
rc = bdb_index_values( op, txn, ap->a_desc,
|
|
|
|
ap->a_nvals, e->e_id, opid );
|
2001-10-04 10:55:09 +08:00
|
|
|
|
|
|
|
if( rc != LDAP_SUCCESS ) {
|
|
|
|
#ifdef NEW_LOGGING
|
2002-07-12 04:33:24 +08:00
|
|
|
LDAP_LOG( INDEX, ENTRY,
|
|
|
|
"index_entry: failure (%d)\n", rc, 0, 0 );
|
2001-10-04 10:55:09 +08:00
|
|
|
#else
|
|
|
|
Debug( LDAP_DEBUG_TRACE,
|
2002-01-26 22:33:31 +08:00
|
|
|
"<= index_entry_%s( %ld, \"%s\" ) failure\n",
|
2003-04-11 09:29:28 +08:00
|
|
|
opid == SLAP_INDEX_ADD_OP ? "add" : "del",
|
2001-10-14 00:55:54 +08:00
|
|
|
(long) e->e_id, e->e_dn );
|
2001-10-04 10:55:09 +08:00
|
|
|
#endif
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef NEW_LOGGING
|
2002-07-12 04:33:24 +08:00
|
|
|
LDAP_LOG( INDEX, ENTRY, "index_entry: success\n", 0, 0, 0 );
|
2001-10-04 10:55:09 +08:00
|
|
|
#else
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
|
2003-04-11 09:29:28 +08:00
|
|
|
opid == SLAP_INDEX_ADD_OP ? "add" : "del",
|
2001-10-14 00:55:54 +08:00
|
|
|
(long) e->e_id, e->e_dn );
|
2001-10-04 10:55:09 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return LDAP_SUCCESS;
|
|
|
|
}
|