From efd23f5c0c97ee45fa15c3a638e59422a50edd82 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 5 Mar 2004 19:29:02 +0000 Subject: [PATCH] Fix prev commit --- servers/slapd/back-bdb/idl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index f86b7e68d9..3620f0285d 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -734,7 +734,7 @@ bdb_idl_insert_key( break; } tmp = id; - rc = cursor->c_put( cursor, key, &data, DB_CURRENT ); + rc = cursor->c_put( cursor, key, &data, DB_KEYFIRST ); if ( rc != 0 ) { cursor->c_close( cursor ); err = "c_put"; @@ -767,6 +767,7 @@ bdb_idl_insert_key( } if ( bdb->bi_idl_cache_max_size ) { + bdb_idl_cache_del( bdb, db, key ); bdb_idl_cache_put( bdb, db, key, idl, 0 ); } return rc; @@ -862,7 +863,7 @@ bdb_idl_delete_key( } if ( isrange && rc == 0 ) { tmp = ( id == lo ) ? idl[1] : idl[2]; - rc = cursor->c_put( cursor, key, &data, DB_CURRENT ); + rc = cursor->c_put( cursor, key, &data, DB_KEYFIRST ); if ( rc != 0 ) { err = "c_put"; } @@ -892,6 +893,7 @@ bdb_idl_delete_key( return rc; } if ( bdb->bi_idl_cache_max_size ) { + bdb_idl_cache_del( bdb, db, key ); bdb_idl_cache_put( bdb, db, key, idl, 0 ); } -- 2.39.5