You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jeremy Boynes <jb...@apache.org> on 2005/03/05 20:14:54 UTC
Schema allowed in constraint name?
In testing the fix for DERBY-158 (imply not null in primary key) I phave
run into an issue with the db2Compatibility.sql test.
It issues the following SQL:
-- no schema names in constraint names (beetle 5143)
CREATE TABLE S5143.T5143_1 (C1 int CONSTRAINT S5143.CPK1 PRIMARY KEY);
CREATE TABLE S5143.T5143_2 (C1 int, C2 int, CONSTRAINT S5143.CPK1
PRIMARY KEY(C1,C2));
CREATE TABLE S5143.T5143_3 (C1 int, C2 int, CONSTRAINT S5143.C3 CHECK(C1
> C2));
These used to fail because C1/C2 did not have a NOT NULL constraint
rather then because the schema name is being rejected; the third
actually passes.
Reading the spec, a <constraint name> is a <schema qualified name> which
would make this syntax valid and the test invalid. If there no
disagreements then I am going to remove these tests (and yes I know this
may break DB2 compatibility ;-) ).
--
Jeremy