From 29dfcec86640d16d841ab112a3b61b839ac4fa80 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 4 Nov 2005 20:00:03 +0000 Subject: [PATCH] reverse previous commit --- servers/slapd/back-bdb/add.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 8455a28bca..a7273ef7c7 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -388,7 +388,13 @@ retry: /* transaction retry */ struct berval nrdn; Entry *e = entry_dup( op->ora_e ); - dnRdn( &e->e_nname, &nrdn ); + /* pick the RDN if not suffix; otherwise pick the entire DN */ + if (pdn.bv_len) { + nrdn.bv_val = e->e_nname.bv_val; + nrdn.bv_len = pdn.bv_val - op->ora_e->e_nname.bv_val - 1; + } else { + nrdn = e->e_nname; + } bdb_cache_add( bdb, ei, e, &nrdn, locker ); -- 2.39.5