db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1022333 - in /db/derby/code/branches/10.6: ./ 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 00:51:05 GMT
Author: mamta
Date: Thu Oct 14 00:51:05 2010
New Revision: 1022333

URL: http://svn.apache.org/viewvc?rev=1022333&view=rev
Log:
Backporting the fix into 10.6 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.6/   (props changed)
    db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    db/derby/code/branches/10.6/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
    db/derby/code/branches/10.6/tools/ant/properties/release.properties

Propchange: db/derby/code/branches/10.6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 14 00:51:05 2010
@@ -1,2 +1,2 @@
-/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,958163,958522,958555,958618,958939,959550,962716,963206,963705,964115,965647,967304,980684,986689,986834,987539,989099,990292,997325,998170,999119,1002291,1002682,1002853
+/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,958163,958522,958555,958618,958939,959550,962716,963206,963705,964115,965647,967304,980684,986689,986834,987539,989099,990292,997325,998170,999119,1002291,1002682,1002853,1021426
 /db/derby/docs/trunk:954344

Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?rev=1022333&r1=1022332&r2=1022333&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
(original)
+++ db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
Thu Oct 14 00:51:05 2010
@@ -516,8 +516,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.6/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java?rev=1022333&r1=1022332&r2=1022333&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
(original)
+++ db/derby/code/branches/10.6/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
Thu Oct 14 00:51:05 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.6/tools/ant/properties/release.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/tools/ant/properties/release.properties?rev=1022333&r1=1022332&r2=1022333&view=diff
==============================================================================
--- db/derby/code/branches/10.6/tools/ant/properties/release.properties (original)
+++ db/derby/code/branches/10.6/tools/ant/properties/release.properties Thu Oct 14 00:51:05
2010
@@ -1,9 +1,9 @@
-#Tue Sep 21 17:05:07 PDT 2010
-major=10
-maint=2000002
+#Mon Oct 11 09:59:46 PDT 2010
 drdamaint=0
+maint=2000003
+major=10
 minor=6
 eversion=10.6
-copyright.comment=Copyright 1997, 2010 The Apache Software Foundation or its licensors, as
applicable.
 beta=false
+copyright.comment=Copyright 1997, 2010 The Apache Software Foundation or its licensors, as
applicable.
 vendor=The Apache Software Foundation



Mime
View raw message