From 37820c6eb0a7061f62fbc7b540eda842cf455bf4 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 08 Mar 2007 20:20:21 +0000
Subject: [PATCH] Fix a bug in the schema backend that could cause problems when deleting one instance of an element and adding a different instance of the same element in the same modification that also depends on a third schema element which was added between the two.  For example, if you tried to have a single modify operation that deleted an existing object class, added a new attribute type, and added a new object class that depended on the new attribute type, the operation would fail because when processing the removal of the object class the server would attempt to determine whether it was going to be re-added later in the operation and therefore attempted to decode any object class additions later in the operation.  An error occurred when trying to decode the new object class because it depended on an attribute type that was not yet defined and the decode operation wasn't told to ignore unknown schema elements.

---
 opends/src/server/org/opends/server/backends/SchemaBackend.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/SchemaBackend.java b/opends/src/server/org/opends/server/backends/SchemaBackend.java
index 4a68e5b..1310f7e 100644
--- a/opends/src/server/org/opends/server/backends/SchemaBackend.java
+++ b/opends/src/server/org/opends/server/backends/SchemaBackend.java
@@ -1689,7 +1689,7 @@
         try
         {
           at = AttributeTypeSyntax.decodeAttributeType(v.getValue(), schema,
-                                                       false);
+                                                       true);
         }
         catch (DirectoryException de)
         {
@@ -2039,7 +2039,7 @@
         ObjectClass oc;
         try
         {
-          oc = ObjectClassSyntax.decodeObjectClass(v.getValue(), schema, false);
+          oc = ObjectClassSyntax.decodeObjectClass(v.getValue(), schema, true);
         }
         catch (DirectoryException de)
         {
@@ -2369,7 +2369,7 @@
         NameForm nf;
         try
         {
-          nf = NameFormSyntax.decodeNameForm(v.getValue(), schema, false);
+          nf = NameFormSyntax.decodeNameForm(v.getValue(), schema, true);
         }
         catch (DirectoryException de)
         {
@@ -2942,7 +2942,7 @@
         try
         {
           dsr = DITStructureRuleSyntax.decodeDITStructureRule(
-                     v.getValue(), schema, false);
+                     v.getValue(), schema, true);
         }
         catch (DirectoryException de)
         {

--
Gitblit v1.10.0