data.flags ^= DB_DBT_PARTIAL;
data.ulen = 0;
rc = cursor->c_get( cursor, &key, &data, DB_CURRENT );
- if ( rc != ENOMEM ) goto leave;
+ if ( rc != DB_BUFFER_SMALL ) goto leave;
/* Allocate a block and retrieve the data */
eh.bv.bv_len = eh.nvals * sizeof( struct berval ) + data.size;
eh.data += eoff;
rc = cursor->c_get( cursor, &key, &data, DB_CURRENT );
+ if ( rc ) goto leave;
#ifdef SLAP_ZONE_ALLOC
/* FIXME: will add ctx later */
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
+ if ( !bdb->bi_nattrs )
+ return 0;
+
if ( slapMode & SLAP_TOOL_QUICK ) {
IndexRec *ir;
int i, rc;