db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r188643 - /incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
Date Tue, 07 Jun 2005 01:09:00 GMT
Author: bandaram
Date: Mon Jun  6 18:09:00 2005
New Revision: 188643

URL: http://svn.apache.org/viewcvs?rev=188643&view=rev
Log:
Move SanityManager code under if (SanityManager.DEBUG).

Submitted by Army Brown (qozinx@sbcglobal.net)

Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java?rev=188643&r1=188642&r2=188643&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java
Mon Jun  6 18:09:00 2005
@@ -105,12 +105,9 @@
 			this.uuid = table.getUUID();
 		}
 
-		if (SanityManager.DEBUG)
-		{
-			assertAutoinc(autoinc,
-				      autoincInc,
-				      columnDefaultInfo);
-		}
+		assertAutoinc(autoinc,
+			      autoincInc,
+			      columnDefaultInfo);
 
 		this.autoincStart = autoincStart;
 		this.autoincInc = autoincInc;
@@ -153,12 +150,9 @@
 		this.uuid = uuid;
 		this.defaultUUID = defaultUUID;
 
-		if (SanityManager.DEBUG)
-		{
-			assertAutoinc(autoinc,
-				      autoincInc,
-				      columnDefaultInfo);
-		}
+		assertAutoinc(autoinc,
+			      autoincInc,
+			      columnDefaultInfo);
 		
 		this.autoincStart = autoincStart;
 		this.autoincInc = autoincInc;
@@ -397,19 +391,24 @@
 	private static void assertAutoinc(boolean autoinc,
 					  long autoincInc,
 					  DefaultInfo defaultInfo){
-		if (autoinc){
-			SanityManager.ASSERT((autoincInc != 0), "increment is zero for  autoincrement column");
-			SanityManager.ASSERT((defaultInfo == null ||
+
+		if (SanityManager.DEBUG) {
+			if (autoinc){
+				SanityManager.ASSERT((autoincInc != 0),
+					"increment is zero for  autoincrement column");
+				SanityManager.ASSERT((defaultInfo == null ||
 					      defaultInfo.isDefaultValueAutoinc()),
 					     "If column is autoinc and have defaultInfo, " + 
 					     "isDefaultValueAutoinc must be true.");
-		}
-		else{
-			SanityManager.ASSERT((autoincInc == 0), "increment is non-zero for non-autoincrement column");
-			SanityManager.ASSERT((defaultInfo == null ||
+			}
+			else{
+				SanityManager.ASSERT((autoincInc == 0),
+					"increment is non-zero for non-autoincrement column");
+				SanityManager.ASSERT((defaultInfo == null ||
 					      ! defaultInfo.isDefaultValueAutoinc()),
 					     "If column is not autoinc and have defaultInfo, " + 
 					     "isDefaultValueAutoinc can not be true");
+			}
 		}
 	}
 

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java?rev=188643&r1=188642&r2=188643&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
Mon Jun  6 18:09:00 2005
@@ -1748,12 +1748,14 @@
                 }
                 catch (StandardException se)
                 {
-                    SanityManager.DEBUG_PRINT("FileContainer",
-                        "got exception from initPage:"  +
-                        "\nreuse = " + reuse +
-                        "\ncreatePageArgs[1] = " + createPageArgs[1] +
-                        "\nallocPage = " + allocPage
-                        );
+                    if (SanityManager.DEBUG) {
+                        SanityManager.DEBUG_PRINT("FileContainer",
+                            "got exception from initPage:"  +
+                            "\nreuse = " + reuse +
+                            "\ncreatePageArgs[1] = " + createPageArgs[1] +
+                            "\nallocPage = " + allocPage
+                            );
+                    }
                     allocCache.dumpAllocationCache();
 
                     throw se;



Mime
View raw message