From 3258bf40eb7c2dc9c0e8ac66c2fc47db4f4fe70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 16 Dec 2015 13:47:17 +0100 Subject: [PATCH] ITS#8291 Reopen cursor after delete --- servers/slapd/back-bdb/tools.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index bac93bf91b..004583d198 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -1158,9 +1158,12 @@ done: } } - rc = bdb->bi_id2entry->bdi_db->cursor( - bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor, - bdb->bi_db_opflags ); + if ( cursor == NULL ) + { + rc = bdb->bi_id2entry->bdi_db->cursor( + bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor, + bdb->bi_db_opflags ); + } return rc; }