71b5bb9 Bug 578167 - repl. of mod/replace deletes multi-valued attrs

Authored and Committed by rmeggins 14 years ago
    Bug 578167 - repl. of mod/replace deletes multi-valued attrs
    
    https://bugzilla.redhat.com/show_bug.cgi?id=578167
    Resolves: bug 578167
    Bug Description: repl. of mod/replace deletes multi-valued attrs
    Reviewed by: nkinder (Thanks!)
    Branch: Directory_Server_8_2_Branch
    Fix Description: The server implements a mod/replace operation as a
    mod/delete if all values, followed by a mod/add of the new values.  The
    mod/delete phase, since it removes all of the values, essentially deletes
    the attribute, so it must set the attribute deletion_csn.  This is even
    true in the case when you do a mod/replace on an attribute that doesn't yet
    exist.  We have to create an empty attribute on the deleted_attrs list with
    the deletion_csn set to the csn of the operation.  This preserves the
    semantics of the mod/replace operation.
    When doing the add phase of the mod/replace, we have to be able to
    resurrect attributes and values that may have been deleted by the mod/delete
    phase.  We can tell that we need to resurrect a deleted value in
    resolve_attribute_state_multi_valued, in the deleted_values loop, because
    the deletioncsn will be the same as the update csn, and the
    delete_priority flag will be 0.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit c559982cddbe09bad1b7717a84c7b0187111d61a)
    
        
file modified
+32 -11