ldap/servers/slapd/back-ldbm/index.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 7d6801fa139fb78b0c5a15785a59e5009bee7ff0
Author: Noriko Hosoi <nhosoi(a)totoro.usersys.redhat.com>
Date: Fri Jun 15 16:32:09 2012 -0700
Trac Ticket #335 - transaction retries need to be cache aware
https://fedorahosted.org/389/ticket/335
Fix description:
Commit bddb5a45f2cd27705cb6629f436ef9a7e2248677 includes this fix:
Additinally, error checking for the conflict value in index_add_mods
was week (curr_attr). This patch is adding the check.
The fix was incomplete. If an add-attempted attribute type itself
does not exist in the entry (not only the attribute value) after
mods applied, the attribute type/value should not have been indexed.
This patch fixes it.
(cherry picked from commit 420c6c289681aa36dfcafba0497de55843aa9157)
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index cfcd51f..43b68f5 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -647,18 +647,18 @@ index_add_mods(
mods[i]->mod_op |= LDAP_MOD_IGNORE;
}
}
- }
- if (mods_valueArray) {
- rc = index_addordel_values_sv( be,
+ if (mods_valueArray) {
+ rc = index_addordel_values_sv( be,
mods[i]->mod_type,
mods_valueArray, NULL,
id, BE_INDEX_ADD, txn );
- if (rc) {
- ldbm_nasty(errmsg, 1042, rc);
- goto error;
+ if (rc) {
+ ldbm_nasty(errmsg, 1042, rc);
+ goto error;
+ }
+ } else {
+ rc = 0;
}
- } else {
- rc = 0;
}
}
break;