db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1022682 - in /db/derby/code/branches/10.5: ./ java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java tools/ant/properties/release.properties
Date Thu, 14 Oct 2010 19:50:50 GMT
Author: mamta
Date: Thu Oct 14 19:50:49 2010
New Revision: 1022682

URL: http://svn.apache.org/viewvc?rev=1022682&view=rev
Log:
Backporting the fix into 10.5 codeline for DERBY-4835 Trigger plan does not recompile with
upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Incremented the release number so that the code changes for upgrade path will be executed.



Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
    db/derby/code/branches/10.5/tools/ant/properties/release.properties

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 14 19:50:49 2010
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.6:942027,957000,962738,965351,987678
-/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915733,916075,916897,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853
+/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915733,916075,916897,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853,1021426

Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?rev=1022682&r1=1022681&r2=1022682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
(original)
+++ db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Thu Oct 14 19:50:49 2010
@@ -470,8 +470,10 @@ public	class DD_Version implements	Forma
 			// SPSes won't be restored.
 			if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
 				bootingDictionary.updateMetadataSPSes(tc);
-			else
-				bootingDictionary.clearSPSPlans();
+			//Following make sure that the stored plans (including the ones for
+			//triggers) will get cleared during upgrade and hence we will not
+			//hold on to stale plans.
+			bootingDictionary.clearSPSPlans();
 
 			DD_Version lastRun;
 			

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java?rev=1022682&r1=1022681&r2=1022682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
Thu Oct 14 19:50:49 2010
@@ -50,7 +50,46 @@ public class BasicSetup extends UpgradeC
     public BasicSetup(String name) {
         super(name);
     }
-      
+    
+    /**
+     * Simple test of the triggers. Added for DERBY-4835
+     */
+    public void testTriggerBasic() throws SQLException
+    {
+        Statement s = createStatement();
+        switch (getPhase())
+        {
+        case PH_CREATE:
+            s.executeUpdate("CREATE TABLE Trigger_t1 " +
+            		"(c1 INTEGER NOT NULL GENERATED ALWAYS " +
+            		"AS IDENTITY (START WITH 1, INCREMENT BY 1), " +
+            		"max_size INTEGER NOT NULL, "+
+            		"CONSTRAINT c1_pk PRIMARY KEY (c1))");
+            s.executeUpdate("CREATE TABLE Trigger_t2 "+
+            		"(c1 INTEGER DEFAULT 0 NOT NULL)");
+            s.executeUpdate("CREATE TRIGGER gls_blt_trg "+
+            		"AFTER INSERT ON Trigger_t1 FOR EACH ROW MODE DB2SQL "+
+            		"INSERT INTO Trigger_t2(c1) "+
+            		"VALUES ( (select max(c1) from Trigger_t1))");
+            s.executeUpdate("INSERT INTO Trigger_t1(max_size) "+
+            		"VALUES(20)");
+            break;
+        case PH_SOFT_UPGRADE:
+            s.executeUpdate("INSERT INTO Trigger_t1(max_size) "+
+    		"VALUES(20)");
+            break;
+        case PH_POST_SOFT_UPGRADE:
+            s.executeUpdate("INSERT INTO Trigger_t1(max_size) "+
+    		"VALUES(20)");
+            break;
+        case PH_HARD_UPGRADE:
+            s.executeUpdate("INSERT INTO Trigger_t1(max_size) "+
+    		"VALUES(20)");
+            break;
+        }
+        s.close();
+    }
+
     /**
      * Simple test of the old version from the meta data.
      */

Modified: db/derby/code/branches/10.5/tools/ant/properties/release.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/tools/ant/properties/release.properties?rev=1022682&r1=1022681&r2=1022682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/tools/ant/properties/release.properties (original)
+++ db/derby/code/branches/10.5/tools/ant/properties/release.properties Thu Oct 14 19:50:49
2010
@@ -1,9 +1,9 @@
-#Thu Jul 16 12:01:21 PDT 2009
-major=10
-maint=3000001
+#Mon Oct 11 19:28:39 PDT 2010
 drdamaint=0
+maint=3000002
+major=10
 minor=5
 eversion=10.5
-copyright.comment=Copyright 1997, 2009 The Apache Software Foundation or its licensors, as
applicable.
 beta=false
+copyright.comment=Copyright 1997, 2009 The Apache Software Foundation or its licensors, as
applicable.
 vendor=The Apache Software Foundation



Mime
View raw message