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 rh...@apache.org on 2012/07/30 18:27:07 UTC
svn commit: r1367150 [2/2] - in /db/derby/code/trunk/java:
build/org/apache/derbyBuild/ client/org/apache/derby/client/am/
engine/org/apache/derby/iapi/types/
engine/org/apache/derby/impl/services/reflect/
engine/org/apache/derby/impl/sql/compile/ engi...
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out?rev=1367150&r1=1367149&r2=1367150&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out Mon Jul 30 16:27:06 2012
@@ -33,23 +33,23 @@ ij> --
-- case sql0632-01
create table t1(a int not null primary key , b int references t1(a) ON DELETE SET NULL,
c int references t1(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE SET NULL,
z int references tself(b) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE SET NULL,
z int references tself(b) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE SET NULL,
z int references tself(b) ON DELETE RESTRICT);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE SET NULL,
z int references tself(b) ON DELETE NO ACTION);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> -- case sql0632 -02 (c2 fails)
create table t1(a int not null primary key, b int not null unique);
0 rows inserted/updated/deleted
@@ -60,7 +60,7 @@ ij> alter table t1 add constraint c1 for
0 rows inserted/updated/deleted
ij> alter table t2 add constraint c2 foreign key (y)
references t1(b) on delete set null;
-ERROR 42915: Foreign Key 'C2' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
+ERROR 42915: Foreign Key 'C2' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
ij> drop table t1;
0 rows inserted/updated/deleted
ij> drop table t2;
@@ -83,7 +83,7 @@ ij> alter table t3 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c4 foreign key (k)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C4' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t1 drop constraint c2;
@@ -128,7 +128,7 @@ ij> alter table t2 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c6 foreign key (k)
references t2(y) on delete SET NULL;
-ERROR 42915: Foreign Key 'C6' is invalid because 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
+ERROR 42915: Foreign Key 'C6' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -166,7 +166,7 @@ ij> alter table t3 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (m)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t3 drop constraint c2;
@@ -189,43 +189,43 @@ ij> --SQL0633N The delete rule of FOREIG
-- case sql0633-01 (t1 creation should fail)
create table t1(a int not null primary key , b int references t1(a) ON DELETE CASCADE,
c int references t1(a) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE RESTRICT,
z int references tself(b) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE RESTRICT,
z int references tself(b) ON DELETE NO ACTION);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE RESTRICT,
z int references tself(b) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be RESTRICT. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE NO ACTION,
z int references tself(b) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE NO ACTION,
z int references tself(b) ON DELETE RESTRICT);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE NO ACTION,
z int references tself(b) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE CASCADE,
z int references tself(b) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE CASCADE,
z int references tself(b) ON DELETE NO ACTION);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE CASCADE,
z int references tself(b) ON DELETE RESTRICT);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> --FOLLOWING CASES SHOULD PASS
create table tself( a int not null primary key, b int not null unique,
x int references tself(a) ON DELETE NO ACTION,
@@ -251,13 +251,13 @@ create table t1(a int not null primary k
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE CASCADE,
y int not null unique, z int references t2(y) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
ij> create table t2(x int references t1(a) ON DELETE CASCADE,
y int not null unique, z int references t2(y) ON DELETE NO ACTION);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
ij> create table t2(x int references t1(a) ON DELETE CASCADE,
y int not null unique, z int references t2(y) ON DELETE RESTRICT);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
ij> --START PASS CASES
--These cases is to make sure we don;t throw errors for the valid cases.
create table t2(x int references t1(a) ON DELETE CASCADE,
@@ -343,7 +343,7 @@ ij> alter table t3 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (m)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C3' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t3 drop constraint c2;
@@ -362,7 +362,7 @@ ij> create table t2(x int references t1(
0 rows inserted/updated/deleted
ij> create table t3(l int references t1(a) ON DELETE CASCADE ,
m int references t2(y) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> drop table t1;
@@ -398,13 +398,13 @@ create table t1(a int not null primary k
0 rows inserted/updated/deleted
ij> create table t2(x int not null unique, y int references t2(x) ON DELETE SET NULL,
z int references t1(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
ij> create table t2(x int not null unique, y int references t2(x) ON DELETE NO ACTION,
z int references t1(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
ij> create table t2(x int not null unique, y int references t2(x) ON DELETE RESTRICT,
z int references t1(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (A self-referencing constraint exists with a delete rule of SET NULL, NO ACTION or RESTRICT.) '.
ij> --START SHOULD PASS CASES
create table t2(x int not null unique, y int references t2(x) ON DELETE CASCADE,
z int references t1(a) ON DELETE SET NULL);
@@ -469,7 +469,7 @@ ij> alter table t2 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t1 add constraint c1 foreign key (b)
references t2(x) on delete cascade;
-ERROR 42915: Foreign Key 'C1' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
+ERROR 42915: Foreign Key 'C1' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
ij> alter table t2 drop constraint c2;
0 rows inserted/updated/deleted
ij> drop table t1;
@@ -497,7 +497,7 @@ ij> alter table t3 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t4 add constraint c4 foreign key (c1)
references t3(m) on delete cascade;
-ERROR 42915: Foreign Key 'C4' is invalid because 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -517,7 +517,7 @@ ij> alter table t3 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t4 add constraint c4 foreign key (c1)
references t3(m) on delete cascade;
-ERROR 42915: Foreign Key 'C4' is invalid because 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -537,7 +537,7 @@ ij> alter table t3 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t4 add constraint c4 foreign key (c1)
references t3(m) on delete cascade;
-ERROR 42915: Foreign Key 'C4' is invalid because 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -557,7 +557,7 @@ ij> alter table t3 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t4 add constraint c4 foreign key (c1)
references t3(m) on delete cascade;
-ERROR 42915: Foreign Key 'C4' is invalid because 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'the delete rule of foreign key can not be CASCADE. (The relationship would cause another table to be delete-connected to the same table through multiple paths with different delete rules or with delete rule equal to SET NULL.) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -723,7 +723,7 @@ ij> create table t2(x int references t1(
0 rows inserted/updated/deleted
ij> create table t3(l int references t1(a) ON DELETE CASCADE ,
m int references t2(y) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> drop table t3 ;
ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T3' because it does not exist.
ij> drop table t2 ;
@@ -798,7 +798,7 @@ ij> alter table t3 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (m)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C3' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t3 drop constraint c2;
@@ -814,7 +814,7 @@ ij> alter table t3 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (m)
references t2(y) on delete cascade;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t3 drop constraint c2;
@@ -894,7 +894,7 @@ ij> alter table t3 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (m)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> alter table t2 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t3 drop constraint c2;
@@ -928,7 +928,7 @@ ij> alter table t1 add constraint c1 for
0 rows inserted/updated/deleted
ij> alter table t2 add constraint c2 foreign key (y)
references t1(b) on delete cascade;
-ERROR 42915: Foreign Key 'C2' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
+ERROR 42915: Foreign Key 'C2' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -939,7 +939,7 @@ alter table t1 add constraint c1 foreign
0 rows inserted/updated/deleted
ij> alter table t2 add constraint c2 foreign key (y)
references t1(b) on delete set null;
-ERROR 42915: Foreign Key 'C2' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
+ERROR 42915: Foreign Key 'C2' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -950,7 +950,7 @@ alter table t2 add constraint c2 foreign
0 rows inserted/updated/deleted
ij> alter table t1 add constraint c1 foreign key (b)
references t2(x) on delete cascade;
-ERROR 42915: Foreign Key 'C1' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
+ERROR 42915: Foreign Key 'C1' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
ij> alter table t1 drop constraint c1;
ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C1' on table '"APP"."T1"'.
ij> alter table t2 drop constraint c2;
@@ -992,7 +992,7 @@ ij> create table t3(l int unique not nul
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE CASCADE ,
y int references t3(l) ON DELETE RESTRICT);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'the delete rule of foreign key must be CASCADE. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> drop table t2;
ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T2' because it does not exist.
ij> drop table t3;
@@ -1039,7 +1039,7 @@ ij> alter table t2 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (k)
references t2(y) on delete set null;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T2 because of delete rule restrictions. (The relationship forms a cycle of two or more tables that cause the table to be delete-connected to itself (all other delete rules in the cycle would be CASCADE)). '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -1056,7 +1056,7 @@ ij> alter table t2 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (k)
references t2(y) on delete cascade;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -1073,7 +1073,7 @@ ij> alter table t2 add constraint c2 for
0 rows inserted/updated/deleted
ij> alter table t3 add constraint c3 foreign key (k)
references t2(y) on delete cascade;
-ERROR 42915: Foreign Key 'C3' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
+ERROR 42915: Foreign Key 'C3' is invalid for the reason which follows: 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '.
ij> alter table t1 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -1138,19 +1138,19 @@ ij> -- self referencing errors
create table tself(a int not null primary key ,
b int references tself(a) ON DELETE SET NULL,
c int references tself(a) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself(a int not null primary key ,
b int references tself(a) ON DELETE CASCADE,
c int references tself(a) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tself(a int not null primary key ,
b int references tself(a) ON DELETE SET NULL,
c int references tself(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.TSELF because of delete rule restrictions. (The relationship is self-referencing and a self-referencing relationship already exists with the SET NULL delete rule.) '.
ij> create table tself(a int not null primary key ,
b int references tself(a) ,
c int references tself(a) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be NO ACTION. (The referential constraint is self-referencing and an existing self-referencing constraint has the indicated delete rule (NO ACTION, RESTRICT or CASCADE).)'.
ij> create table tparent( a int not null primary key);
0 rows inserted/updated/deleted
ij> --THIS ONE SHOULD PASS , but currently we are throwing ERRROR
@@ -1171,7 +1171,7 @@ ij> --should throw error
create table tself(a int not null primary key ,
b int references tparent(a) ON DELETE CASCADE ,
c int references tself(a) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The delete rule of foreign key must be CASCADE. (The referential constraint is self-referencing and the table is dependent in a relationship with a delete rule of CASCADE.)'.
ij> drop table tself;
ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TSELF' because it does not exist.
ij> --should pass
@@ -1247,7 +1247,7 @@ ij> alter table t4 add constraint c3 for
0 rows inserted/updated/deleted
ij> alter table t4 add constraint c4 foreign key (y)
references t3(m) on delete cascade;
-ERROR 42915: Foreign Key 'C4' is invalid because 'The table cannot be defined as a dependent of table APP.T3 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'C4' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T3 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> alter table t3 drop constraint c1;
0 rows inserted/updated/deleted
ij> alter table t2 drop constraint c2;
@@ -1267,28 +1267,28 @@ create table t1( a int not null primary
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE RESTRICT,
y int not null unique, z int references t1(b) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'the delete rule of foreign key must be RESTRICT. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'the delete rule of foreign key must be RESTRICT. (The relationship would cause the table to be delete-connected to the same table through multiple relationships and such relationships must have the same delete rule (NO ACTION, RESTRICT or CASCADE).) '.
ij> drop table t1;
0 rows inserted/updated/deleted
ij> create table t1(a int not null unique , b int not null unique);
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE SET NULL ,
y int references t1(b) ON DELETE CASCADE);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> drop table t1;
0 rows inserted/updated/deleted
ij> create table t1(a int not null unique , b int not null unique);
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE SET NULL ,
y int references t1(b) ON DELETE SET NULL);
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> drop table t1;
0 rows inserted/updated/deleted
ij> create table t1(a int not null unique , b int not null unique);
0 rows inserted/updated/deleted
ij> create table t2(x int references t1(a) ON DELETE SET NULL ,
y int references t1(b));
-ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid because 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
+ERROR 42915: Foreign Key 'xxxxGENERATED-IDxxxx' is invalid for the reason which follows: 'The table cannot be defined as a dependent of table APP.T1 because of delete rule restrictions. (The relationship causes the table to be delete-connected to the indicated table through multiple relationships and the delete rule of the existing relationship is SET NULL.). '.
ij> drop table t1;
0 rows inserted/updated/deleted
ij>
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?rev=1367150&r1=1367149&r2=1367150&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java Mon Jul 30 16:27:06 2012
@@ -233,16 +233,16 @@ public final class ErrorCodeTest extends
{"XSLA8","Cannot rollback transaction {0}, trying to compensate {1} operation with {2}","45000"},
{"XSLAA","The store has been marked for shutdown by an earlier exception.","45000"},
{"XSLAB","Cannot find log file {0}, please make sure your logDevice property is properly set with the correct path separator for your platform.","45000"},
- {"XSLAC","Database at {0} have incompatible format with the current version of software, it may have been created by or upgraded by a later version.","45000"},
- {"XSLAD","log Record at instant {2} in log file {3} corrupted. Expected log record length {0}, real length {1}.","45000"},
+ {"XSLAC","Database at {0} has a format incompatible with the current version of software. It may have been created by or upgraded by a later version.","45000"},
+ {"XSLAD","Log Record at instant {2} in log file {3} corrupted. Expected log record length {0}, real length {1}.","45000"},
{"XSLAE","Control file at {0} cannot be written or updated.","45000"},
{"XSLAF","A Read Only database was created with dirty data buffers.","45000"},
{"XSLAH","A Read Only database is being updated.","45000"},
{"XSLAI","Cannot log the checkpoint log record","45000"},
{"XSLAJ","The logging system has been marked to shut down due to an earlier problem and will not allow any more operations until the system shuts down and restarts.","45000"},
{"XSLAK","Database has exceeded largest log file number {0}.","45000"},
- {"XSLAL","log record size {2} exceeded the maximum allowable log file size {3}. Error encountered in log file {0}, position {1}.","45000"},
- {"XSLAM","Cannot verify database format at {1} due to IOException.","45000"},
+ {"XSLAL","Log record size {2} exceeded the maximum allowable log file size {3}. Error encountered in log file {0}, position {1}.","45000"},
+ {"XSLAM","Cannot verify database format at {1} due to IOException: {0}","45000"},
{"XSLAN","Database at {0} has an incompatible format with the current version of the software. The database was created by or upgraded by version {1}.","45000"},
{"XSLAO","Recovery failed unexpected problem: {0}.","45000"},
{"XSLAP","Database at {0} is at version {1}. Beta databases cannot be upgraded,","45000"},
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=1367150&r1=1367149&r2=1367150&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Mon Jul 30 16:27:06 2012
@@ -1387,8 +1387,13 @@ public class JDBC {
Assert.assertEquals("Unexpected row count",
expectedRows.length, actual.size());
}
- Assert.assertTrue("Missing rows in ResultSet",
- actual.containsAll(expected));
+ if ( !actual.containsAll(expected) )
+ {
+ expected.removeAll( actual );
+ BaseTestCase.println
+ ( "These expected rows don't appear in the actual result: " + expected );
+ Assert.fail( "Missing rows in ResultSet" );
+ }
}
/**