db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r178332 - in /incubator/derby/code/trunk/java: engine/org/apache/derby/impl/sql/catalog/DD_Version.java engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java testing/org/apache/derbyTesting/functionTests/suites/storemore.runall
Date Wed, 25 May 2005 00:46:59 GMT
Author: mikem
Date: Tue May 24 17:46:58 2005
New Revision: 178332

URL: http://svn.apache.org/viewcvs?rev=178332&view=rev
Log:
adding hard upgrade support for inline compress system procedure.


Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemore.runall

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?rev=178332&r1=178331&r2=178332&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Tue May 24 17:46:58 2005
@@ -327,6 +327,16 @@
 		}
 		
 		*/
+
+        if (fromMajorVersionNumber == DataDictionary.DD_VERSION_CS_10_0)
+        {
+            // This upgrade depends on the SYSUTIL schema, which only exists
+            // since 10.0.  Will not work to upgrade any db previous to 10.0,
+            // thus only checks for 10.0 rather than <= 10.0.
+            bootingDictionary.create_10_1_system_procedures(
+                tc, 
+                bootingDictionary.getSystemUtilSchemaDescriptor().getUUID());
+        }
 	}
 
 	/**

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=178332&r1=178331&r2=178332&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Tue May 24 17:46:58 2005
@@ -8479,47 +8479,6 @@
                 tc);
         }
 
-        // void SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE(
-        //     IN SCHEMANAME        VARCHAR(128), 
-        //     IN TABLENAME         VARCHAR(128),
-        //     IN PURGE_ROWS        SMALLINT,
-        //     IN DEFRAGMENT_ROWS   SMALLINT,
-        //     IN TRUNCATE_END      SMALLINT
-        //     )
-        {
-            // procedure argument names
-            String[] arg_names = {
-                "SCHEMANAME", 
-                "TABLENAME", 
-                "PURGE_ROWS", 
-                "DEFRAGMENT_ROWS", 
-                "TRUNCATE_END"};
-
-            // procedure argument types
-            TypeDescriptor[] arg_types = {
-                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, 128),
-                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, 128),
-                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.SMALLINT),
-                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.SMALLINT),
-                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.SMALLINT)
-            };
-
-            createSystemProcedureOrFunction(
-                "SYSCS_INPLACE_COMPRESS_TABLE",
-                sysUtilUUID,
-                arg_names,
-                arg_types,
-				0,
-				0,
-                RoutineAliasInfo.MODIFIES_SQL_DATA,
-                (TypeDescriptor) null,
-                tc);
-        }
 
         /*
 		** SQLJ routine.
@@ -8812,7 +8771,8 @@
                 tc);
         }
 
-
+        // add 10.1 specific system procedures
+        create_10_1_system_procedures(tc, sysUtilUUID);
     }
 
     /**
@@ -9282,7 +9242,69 @@
                 (TypeDescriptor) null,
                 tc);
         }
+
 	}
+
+
+    /**
+     * Create system procedures added in version 10.1.
+     * <p>
+     * Create 10.1 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.
+     *
+	 * @exception  StandardException  Standard exception policy.
+     **/
+    void create_10_1_system_procedures(
+    TransactionController   tc,
+    UUID                    sysUtilUUID)
+		throws StandardException
+    {
+
+        // void SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE(
+        //     IN SCHEMANAME        VARCHAR(128), 
+        //     IN TABLENAME         VARCHAR(128),
+        //     IN PURGE_ROWS        SMALLINT,
+        //     IN DEFRAGMENT_ROWS   SMALLINT,
+        //     IN TRUNCATE_END      SMALLINT
+        //     )
+        {
+            // procedure argument names
+            String[] arg_names = {
+                "SCHEMANAME", 
+                "TABLENAME", 
+                "PURGE_ROWS", 
+                "DEFRAGMENT_ROWS", 
+                "TRUNCATE_END"};
+
+            // procedure argument types
+            TypeDescriptor[] arg_types = {
+                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
+                    Types.VARCHAR, 128),
+                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
+                    Types.VARCHAR, 128),
+                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
+                    Types.SMALLINT),
+                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
+                    Types.SMALLINT),
+                DataTypeDescriptor.getBuiltInDataTypeDescriptor(
+                    Types.SMALLINT)
+            };
+
+            createSystemProcedureOrFunction(
+                "SYSCS_INPLACE_COMPRESS_TABLE",
+                sysUtilUUID,
+                arg_names,
+                arg_types,
+				0,
+				0,
+                RoutineAliasInfo.MODIFIES_SQL_DATA,
+                (TypeDescriptor) null,
+                tc);
+        }
+    }
 
 
 	/*

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemore.runall
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemore.runall?rev=178332&r1=178331&r2=178332&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemore.runall
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemore.runall
Tue May 24 17:46:58 2005
@@ -28,3 +28,4 @@
 store/holdCursorJDBC30.sql
 store/holdCursorExternalSortJDBC30.sql
 store/TestDurabilityProperty.java
+store/OnlineCompressTest.java



Mime
View raw message