From: Howard Chu Date: Wed, 24 Dec 2003 10:59:50 +0000 (+0000) Subject: ITS#2895 store a copy in the entry cache X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93390425dfe797a3fa7abfdc76f99b9c4c2536ee;p=openldap ITS#2895 store a copy in the entry cache --- 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 )) {