db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r535429 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java
Date Sat, 05 May 2007 00:58:52 GMT
Author: mikem
Date: Fri May  4 17:58:51 2007
New Revision: 535429

URL: http://svn.apache.org/viewvc?view=rev&rev=535429
Log:
DERBY-2611

Fixed upgrade test when run against 10.3 to not try and use in place compress
in version 10.0.  This feature was added in 10.1.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java?view=diff&rev=535429&r1=535428&r2=535429
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java
Fri May  4 17:58:51 2007
@@ -85,7 +85,7 @@
      */
     public void testCompilationSchema() throws SQLException
     {        
-       switch (getPhase())
+        switch (getPhase())
         {
             case PH_CREATE:
             case PH_POST_SOFT_UPGRADE:
@@ -120,34 +120,54 @@
         throws SQLException
     {
         switch(getPhase()) {
-        case PH_CREATE: {
-            // This case is derived from OnlineCompressTest.test6.
-            Statement s = createStatement();
-            s.execute("create table case606(keycol int, indcol1 int,"+
-                "indcol2 int, data1 char(24), data2 char(24), data3 char(24)," +
-                "data4 char(24), data5 char(24), data6 char(24),"+
-                "data7 char(24), data8 char(24), data9 char(24)," + 
-                "data10 char(24), inddec1 decimal(8), indcol3 int,"+
-                "indcol4 int, data11 varchar(50))");
-            s.close();
-            break;
-        }
-        case PH_SOFT_UPGRADE:
-            // Ensure that the old Log Record format is written
-            // by Newer release without throwing any exceptions.
-            checkDataToCase606(0, 2000);
-            break;
-        case PH_POST_SOFT_UPGRADE:
-            // We are now back to Old release
-            checkDataToCase606(0, 1000);
-            break;
-
-        case PH_HARD_UPGRADE:
-            // Create the Derby606 bug scenario and test that
-            // the error does not occur in Hard Upgrade
-            checkDataToCase606(0, 94000);
+            case PH_CREATE: {
+
+                // This case is derived from OnlineCompressTest.test6.
+                Statement s = createStatement();
+                s.execute("create table case606(keycol int, indcol1 int,"+
+                    "indcol2 int, data1 char(24), data2 char(24), " +
+                    "data3 char(24)," +
+                    "data4 char(24), data5 char(24), data6 char(24),"+
+                    "data7 char(24), data8 char(24), data9 char(24)," + 
+                    "data10 char(24), inddec1 decimal(8), indcol3 int,"+
+                    "indcol4 int, data11 varchar(50))");
+                s.close();
 
-            break;
+                break;
+            }
+
+            case PH_SOFT_UPGRADE:
+                // in place compress was added in 10.1 release, don't check
+                // upgrade of it from 10.0 release.
+                if (!oldAtLeast(10, 1))
+                    return;
+
+                // Ensure that the old Log Record format is written
+                // by Newer release without throwing any exceptions.
+                checkDataToCase606(0, 2000);
+                break;
+
+            case PH_POST_SOFT_UPGRADE:
+                // in place compress was added in 10.1 release, don't check
+                // upgrade of it from 10.0 release.
+                if (!oldAtLeast(10, 1))
+                    return;
+
+                // We are now back to Old release
+                checkDataToCase606(0, 1000);
+                break;
+
+            case PH_HARD_UPGRADE:
+                // in place compress was added in 10.1 release, don't check
+                // upgrade of it from 10.0 release.
+                if (!oldAtLeast(10, 1))
+                    return;
+
+                // Create the Derby606 bug scenario and test that
+                // the error does not occur in Hard Upgrade
+                checkDataToCase606(0, 94000);
+
+                break;
         }
     }
     



Mime
View raw message