db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r533893 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/catalog/ testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/
Date Tue, 01 May 2007 00:26:58 GMT
Author: rhillegas
Date: Mon Apr 30 17:26:57 2007
New Revision: 533893

URL: http://svn.apache.org/viewvc?view=rev&rev=533893
Log:
DERBY-2385: Commit Narayanan's upgrade_v4.diff patch, which adds LOB-specific procedures.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_3.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?view=diff&rev=533893&r1=533892&r2=533893
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java Mon
Apr 30 17:26:57 2007
@@ -398,9 +398,7 @@
         {
             // On ugrade from versions before 10.3, create system procedures
             // added in 10.3.
-            bootingDictionary.create_10_3_system_procedures(
-                tc, 
-                bootingDictionary.getSystemUtilSchemaDescriptor().getUUID());
+            bootingDictionary.create_10_3_system_procedures(tc);
         }
 	}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?view=diff&rev=533893&r1=533892&r2=533893
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Mon Apr 30 17:26:57 2007
@@ -9330,10 +9330,7 @@
         // add 10.2 specific system procedures
         create_10_2_system_procedures(tc, sysUtilUUID);
         // add 10.3 specific system procedures
-        create_10_3_system_procedures(tc, sysUtilUUID);
-        //create 10.3 functions used by LOB methods.
-        UUID sysIBMUUID = getSysIBMSchemaDescriptor().getUUID();
-        create_10_3_LOB_Specific_functions(tc, sysIBMUUID);
+        create_10_3_system_procedures(tc);
     }
 
     /**
@@ -10122,10 +10119,11 @@
      *
      * @throws StandardException  Standard exception policy.
      **/
-    private void create_10_3_LOB_Specific_functions(
-        TransactionController   tc,
-        UUID                    schema_uuid)
+    private void create_10_3_system_procedures_SYSIBM(
+        TransactionController   tc)
         throws StandardException {
+        //create 10.3 functions used by LOB methods.
+        UUID schema_uuid = getSysIBMSchemaDescriptor().getUUID();
         {
             UUID routine_uuid = null;
             String[] arg_names = null;
@@ -10509,22 +10507,34 @@
     }
 
     /**
-     * Create system procedures added in version 10.3.
+     * Create the System procedures that are added in 10.3.
+     *
+     * @param tc an instance of the TransactionController.
+     * @throws StandardException Standard exception policy. 
+     */
+    void create_10_3_system_procedures(TransactionController tc) 
+    throws StandardException {
+        // Create the procedures in the SYSCS_UTIL schema.
+        create_10_3_system_procedures_SYSCS_UTIL(tc);
+        //create the procedures in the SYSIBM schema
+        create_10_3_system_procedures_SYSIBM(tc);
+    }
+    /**
+     * Create system procedures that are part of the
+     * SYSCS_UTIL schema added in version 10.3.
      * <p>
      * Create 10.3 system procedures, called by either code creating new
      * database, or code doing hard upgrade from previous version.
      * <p>
      *
-     * @param sysUtilUUID   uuid of the SYSUTIL schema.
-     *
+     * @param tc an instance of the Transaction Controller.
      * @exception  StandardException  Standard exception policy.
      **/
-    void create_10_3_system_procedures(
-    TransactionController   tc,
-    UUID                    sysUtilUUID)
+    void create_10_3_system_procedures_SYSCS_UTIL(
+    TransactionController   tc)
         throws StandardException
     {
-
+        UUID  sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
         /* SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE(IN SCHEMANAME  VARCHAR(128), 
          * IN TABLENAME    VARCHAR(128), IN FILENAME VARCHAR(32672) , 
          * IN COLUMNDELIMITER CHAR(1),  IN CHARACTERDELIMITER CHAR(1) ,  

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=533893&r1=533892&r2=533893
==============================================================================
--- 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
Mon Apr 30 17:26:57 2007
@@ -32,6 +32,9 @@
 import org.apache.derbyTesting.junit.SupportFilesSetup;
 import org.apache.derbyTesting.junit.JDBC;
 
+import org.apache.derbyTesting.functionTests.tests.jdbcapi.BlobStoredProcedureTest;
+import org.apache.derbyTesting.functionTests.tests.jdbcapi.ClobStoredProcedureTest;
+
 
 /**
  * Upgrade test cases for changes made in 10.3.
@@ -44,11 +47,28 @@
 public class Changes10_3 extends UpgradeChange {
 
     private static  final   String  UNKNOWN_PROCEDURE = "42Y03";
-    
-    public static Test suite() {
+   
+    /**
+     * Return the suite of tests to test the changes made in 10.3.
+     * @param phase an integer that indicates the current phase in
+     *              the upgrade test.
+     * @return the test suite created.
+     */   
+    public static Test suite(int phase) {
         TestSuite suite = new TestSuite("Upgrade changes for 10.3");
         
         suite.addTestSuite(Changes10_3.class);
+        
+        //Add the tests for the Stored procedures related to the locator
+        //implementation of the LOB related JDBC methods. This needs to be done
+        //only during the hard(full) upgrade phase.
+        if(phase == PH_HARD_UPGRADE) {
+            //Tests for the Blob related locator StoredProcedures
+            suite.addTestSuite(BlobStoredProcedureTest.class);
+            //Tests for the Clob related locator StoredProcedures
+            suite.addTestSuite(ClobStoredProcedureTest.class);
+        }
+        
         return new SupportFilesSetup((Test) suite);
     }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java?view=diff&rev=533893&r1=533892&r2=533893
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
Mon Apr 30 17:26:57 2007
@@ -184,8 +184,13 @@
                     suite.addTest(Changes10_1.suite());
                 if (oldMinor < 2)
                    suite.addTest(Changes10_2.suite());
-                if (oldMinor < 3)
-                   suite.addTest(Changes10_3.suite());
+                if (oldMinor < 3) {
+                   //Pass the phase as a parameter to the
+                   //suite method that will enable the test to add existing
+                   //junit tests after checking for the phase of the current
+                   //run. 
+                   suite.addTest(Changes10_3.suite(phase));
+                 }
             }
             
             // Add DatabaseMetaData tests. Since metadata



Mime
View raw message