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/08/13 02:53:17 UTC
svn commit: r1617642 - in /db/derby/code/branches/10.11: ./
java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
Author: mamta
Date: Wed Aug 13 00:53:17 2014
New Revision: 1617642
URL: http://svn.apache.org/r1617642
Log:
DERBY-6684(Failure in testDERBY5120NumRowsInSydependsForTrigger when upgrading from 10.11.1.0 to trunk)
Backporting changes from trunk to 10.11. No futher backporting is needed because the test had started failing because of DERBY-2041(Trigger should register a dependency on tables and columns used in its body) but the change for DERBY-2041 went in 10.11 codeline
Modified:
db/derby/code/branches/10.11/ (props changed)
db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
Propchange: db/derby/code/branches/10.11/
------------------------------------------------------------------------------
Merged /db/derby/code/trunk:r1617641
Modified: db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java?rev=1617642&r1=1617641&r2=1617642&view=diff
==============================================================================
--- db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java (original)
+++ db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java Wed Aug 13 00:53:17 2014
@@ -401,8 +401,21 @@ public class BasicSetup extends UpgradeC
Statement s = createStatement();
boolean modeDb2SqlOptional = oldAtLeast(10, 3);
- dropTable("ATDC_BKUP1");
+ //DERBY-6684(Failure in testDERBY5120NumRowsInSydependsForTrigger when
+ // upgrading from 10.11.1.0 to trunk)
+ //We ran into DERBY-6684 after the fix for DERBY-2041 went into 10.11
+ //The failure is the expected behavior since when dropping a table,
+ // we should detect any dependent triggers defined on other tables
+ // and drop table should fail if such dependencies exist. To fix the
+ // test failure, we just need to switch the order of drop table
+ //DERBY-2041(Trigger should register a dependency on tables and
+ // columns used in its body)
+ //Drop ATDC_TAB1 before ATDC_BKUP1 because ATDC_TAB1 has a trigger
+ // on it which references ATDC_BKUP1. If we try dropping ATDC_BKUP1
+ // without first dropping ATDC_TAB1, there will be an error message
+ // that trigger ATDC_TAB1_TRG1 depends on ATDC_BKUP1
dropTable("ATDC_TAB1");
+ dropTable("ATDC_BKUP1");
s.execute("create table ATDC_TAB1(c11 int, c12 int)");
s.execute("insert into ATDC_TAB1 values (1,11)");
s.execute("create table ATDC_BKUP1(c111 int, c112 int)");