浏览代码

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.
Noriko Hosoi 13 年之前
父节点
当前提交
420c6c2896
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      ldap/servers/slapd/back-ldbm/index.c

+ 8 - 8
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;