From 93390425dfe797a3fa7abfdc76f99b9c4c2536ee Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 24 Dec 2003 10:59:50 +0000 Subject: [PATCH] ITS#2895 store a copy in the entry cache --- servers/slapd/back-bdb/add.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index a96e590161..c807f24416 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -476,18 +476,19 @@ retry: /* transaction retry */ } else { struct berval nrdn; + Entry *e = entry_dup( op->ora_e ); if (pdn.bv_len) { - nrdn.bv_val = op->ora_e->e_nname.bv_val; - nrdn.bv_len = pdn.bv_val - nrdn.bv_val - 1; + nrdn.bv_val = e->e_nname.bv_val; + nrdn.bv_len = pdn.bv_val - op->ora_e->e_nname.bv_val - 1; } else { - nrdn = op->ora_e->e_nname; + nrdn = e->e_nname; } - bdb_cache_add( bdb, ei, op->oq_add.rs_e, &nrdn, locker ); + bdb_cache_add( bdb, ei, e, &nrdn, locker ); if ( suffix_ei == NULL ) { - suffix_ei = op->oq_add.rs_e->e_private; + suffix_ei = e->e_private; } if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) { -- 2.39.5