You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2007/05/08 08:08:14 UTC
svn commit: r536071 -
/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Author: mikem
Date: Mon May 7 23:08:14 2007
New Revision: 536071
URL: http://svn.apache.org/viewvc?view=rev&rev=536071
Log:
DERBY-2613
backporting 535466 change from trunk to 10.2.
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/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?view=diff&rev=536071&r1=536070&r2=536071
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java Mon May 7 23:08:14 2007
@@ -345,6 +345,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
@@ -364,12 +378,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);