db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r535466 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Date Sat, 05 May 2007 07:01:22 GMT
Author: mikem
Date: Sat May  5 00:01:22 2007
New Revision: 535466

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

Upgrade of 10.0 to 10.3 was failing because system procedures were being
created, and as part of the creation some updates were attempted to catalogs
that were not created yet.  Fixed in full upgrade by first creating the
new system catalogs and then creating the procedures.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.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=535466&r1=535465&r2=535466
==============================================================================
--- 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 Sat
May  5 00:01:22 2007
@@ -361,6 +361,20 @@
 		
 		*/
 
+        if (fromMajorVersionNumber <= DataDictionary.DD_VERSION_DERBY_10_1)
+        {
+            // add catalogs 1st, subsequent procedure adding may depend on
+            // catalogs.
+
+			// Add new system catalogs created for grant and revoke
+			bootingDictionary.upgradeMakeCatalog(
+                tc, DataDictionary.SYSTABLEPERMS_CATALOG_NUM);
+			bootingDictionary.upgradeMakeCatalog(
+                tc, DataDictionary.SYSCOLPERMS_CATALOG_NUM);
+			bootingDictionary.upgradeMakeCatalog(
+                tc, DataDictionary.SYSROUTINEPERMS_CATALOG_NUM);
+        }
+
         if (fromMajorVersionNumber == DataDictionary.DD_VERSION_CS_10_0)
         {
             // This upgrade depends on the SYSUTIL schema, which only exists
@@ -380,12 +394,10 @@
                 bootingDictionary.getSystemUtilSchemaDescriptor().getUUID());
 
 			if (SanityManager.DEBUG)
-				SanityManager.ASSERT((aid != null), "Failed to get new Database Owner authorization");
-
-			// Add new system catalogs created for grant and revoke
-			bootingDictionary.upgradeMakeCatalog(tc, DataDictionary.SYSTABLEPERMS_CATALOG_NUM);
-			bootingDictionary.upgradeMakeCatalog(tc, DataDictionary.SYSCOLPERMS_CATALOG_NUM);
-			bootingDictionary.upgradeMakeCatalog(tc, DataDictionary.SYSROUTINEPERMS_CATALOG_NUM);
+            {
+				SanityManager.ASSERT((aid != null), 
+                    "Failed to get new Database Owner authorization");
+            }
 
 			// Change system schemas to be owned by aid
 			bootingDictionary.updateSystemSchemaAuthorization(aid, tc);



Mime
View raw message