/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#endif
{
buf[0] = DN_SUBTREE_PREFIX;
- rc = db->del( db, txn, &key, 0 );
+ rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
if ( !BDB_IDL_IS_RANGE( cx->tmp ) && cx->tmp[0] > 3 )
bdb_idl_sort( cx->tmp, cx->buf );
- if ( cx->bdb->bi_idl_cache_max_size ) {
+ if ( cx->bdb->bi_idl_cache_max_size && !BDB_IDL_IS_ZERO( cx->tmp )) {
char *ptr = ((char *)&cx->id)-1;
cx->key.data = ptr;
cx->key.size = sizeof(ID)+1;