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 ma...@apache.org on 2014/05/21 05:36:59 UTC

svn commit: r1596451 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java

Author: mamta
Date: Wed May 21 03:36:59 2014
New Revision: 1596451

URL: http://svn.apache.org/r1596451
Log:
DERBY-6547(testDERBY5120NumRowsInSydependsForTrigger fails when the starting version of the upgrade trajectory is 10.10.2.0)

10.10, 10.9 and 10.8 jars started failing in upgrade suite(in testDERBY5120NumRowsInSydependsForTrigger) after following was backported into those codelines
*****
DERBY-6383(Update trigger defined on one column fires on update of other columns)

Backporting following 2 revisions from trunk to 10.10. Had to hand do the changes because of conflicts during svn merge.
1537593, 1538854 
*****

The reason behind the failure is actually how testDERBY5120NumRowsInSydependsForTrigger test was written and not a code regression. 

The test creates a trigger which is supposed to fire on a specific column
	create trigger ATDC_TAB1_TRG1 after update of C11 on ATDC_TAB1 REFERENCING old_table as old 
        	for each statement MODE DB2SQL insert into ATDC_BKUP1 select * from old
But later on it the test, it is expecting the trigger to fire on update of non-trigger column of the table. This was fine before DERBY-6383 was backported because w/o the fix for DERBY-6383, triggers would fire on update of any column on the table(DERBY-6383 - Update trigger defined on one column fires on update of other columns). But after those codelines got the fix for DERBY-6383 as part of the backport, the trigger correctly won't fire any more on non-trigger columns and that started the test failure. I have fixed the test to update the trigger column in order to fire the trigger and now the test behaves correctly. I will backport this test fix upto 10.8 codelines which is how far DERBY-6383 got backported to.



Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java?rev=1596451&r1=1596450&r2=1596451&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java Wed May 21 03:36:59 2014
@@ -498,20 +498,20 @@ public class BasicSetup extends UpgradeC
         	//During the path back to original release, all the spses get
         	// marked invalid and hence they will be regenerated during 
         	// the next time they get fired. This regeneration will cause
-        	// the dependency between trigger action sps and trigger table
+        	// the dependency between trigger action sps and trigger table 
         	// be dropped except in 10.8.2.2 and higher releases where
         	// DERBY-5120 has already been fixed.
             assertStatementError("42802", s, " update ATDC_TAB1 set c11=2");
 
         	preapreFortDERBY5120();
-            s.execute("update ATDC_TAB1 set c12=11");
+            s.execute("update ATDC_TAB1 set c11=11");
             s.executeUpdate("alter table ATDC_TAB1 add column c113 int");
             //DERBY-5120 has been fixed in 10.8.2.2 and higher and hence we 
             // will not see the buggy behavior on those codelines
             if (oldLessThan(10,8,2,2)) 
-                s.execute("update ATDC_TAB1 set c12=11");
+                s.execute("update ATDC_TAB1 set c11=11");
             else
-                assertStatementError("42802", s, " update ATDC_TAB1 set c12=11");            
+                assertStatementError("42802", s, " update ATDC_TAB1 set c11=11");            
         	break;
 
         case PH_POST_HARD_UPGRADE: