summaryrefslogtreecommitdiffstats
path: root/ldap/servers
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2008-06-20 15:10:00 +0000
committerNathan Kinder <nkinder@redhat.com>2008-06-20 15:10:00 +0000
commitd80ddd54286c83d00a89aac11d844cd75bbde752 (patch)
tree223be7a948933e1fa12c05f370f00fd1757c2b6f /ldap/servers
parent0895c26fcf5eedda8064bed59df46b8f60017d6d (diff)
downloadds-d80ddd54286c83d00a89aac11d844cd75bbde752.tar.gz
ds-d80ddd54286c83d00a89aac11d844cd75bbde752.tar.xz
ds-d80ddd54286c83d00a89aac11d844cd75bbde752.zip
Resolves: 452169
Summary: Indexing code needs to use new entry copy to search for subtypes when deleting an attribute value.
Diffstat (limited to 'ldap/servers')
-rw-r--r--ldap/servers/slapd/back-ldbm/index.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 344f33f1..92e973ce 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -652,13 +652,21 @@ index_add_mods(
* BE_INDEX_EQUALITY flag so the equality index is
* removed.
*/
- slapi_entry_attr_find( olde->ep_entry, mods[i]->mod_type, &curr_attr);
- for (j = 0; mods_valueArray[j] != NULL; j++ ) {
- if ( valuearray_find(curr_attr, evals, mods_valueArray[j]) == -1 ) {
- if (!(flags & BE_INDEX_EQUALITY)) {
- flags |= BE_INDEX_EQUALITY;
+ slapi_entry_attr_find( newe->ep_entry, mods[i]->mod_type, &curr_attr);
+ if (curr_attr) {
+ for (j = 0; mods_valueArray[j] != NULL; j++ ) {
+ if ( valuearray_find(curr_attr, evals, mods_valueArray[j]) == -1 ) {
+ if (!(flags & BE_INDEX_EQUALITY)) {
+ flags |= BE_INDEX_EQUALITY;
+ }
}
}
+ } else {
+ /* If we didn't find the attribute in the new
+ * entry, we should remove the equality index. */
+ if (!(flags & BE_INDEX_EQUALITY)) {
+ flags |= BE_INDEX_EQUALITY;
+ }
}
rc = index_addordel_values_sv( be, basetype,