db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Schema allowed in constraint name?
Date Sat, 05 Mar 2005 19:14:54 GMT
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

Mime
View raw message