From c1a7e2cae728c5000124969eedc1dd701baa99b8 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Wed, 20 Feb 2013 14:11:46 +0000
Subject: [PATCH] Fix OPENDJ-765 Modify with replace attr=value and delete attr gets misrecorded in ds-sync-hist
---
opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java b/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java
index 92ada58..2ee391a 100644
--- a/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java
+++ b/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.replication.plugin;
@@ -102,6 +102,7 @@
switch (mod.getModificationType())
{
case DELETE:
+ this.addTime = null;
this.deleteTime = changeNumber;
this.value = newValue;
lastMod = HistAttrModificationKey.DEL;
@@ -117,7 +118,9 @@
if (newValue == null)
{
// REPLACE with null value is actually a DELETE
+ this.addTime = null;
this.deleteTime = changeNumber;
+ this.value = null;
lastMod = HistAttrModificationKey.DEL;
}
else
@@ -260,6 +263,7 @@
{
if (newValue == null)
{
+ addTime = null;
value = newValue;
deleteTime = changeNumber;
lastMod = HistAttrModificationKey.DEL;
--
Gitblit v1.10.0