Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
10.2.1.6
-
None
-
Normal
-
Newcomer, Repro attached
Description
Defining the same primary key twice on a table actually attempts to create two constraints.
ij> create table t ( i int, b int, primary key (i,b), primary key (i,b));
ERROR 42Z93: Constraints 'SQL060215062628851' and 'SQL060215062628850' have the
same set of columns, which is not allowed.
ij> create table t ( i int primary key primary key primary key);
ERROR 42Z93: Constraints 'SQL060214082337951' and 'SQL060214082337950' have the
same set of columns, which is not allowed.
Other combinations of two primary keys (that I could think of) return the correct error.
ij> create table t ( i int, b int, primary key (i,b), primary key (b));
ERROR 42X90: More than one primary key constraint specified for table 'T'.
ij> create table t ( i int primary key, b int primary key);
ERROR 42X90: More than one primary key constraint specified for table 'T'.
Attachments
Attachments
Issue Links
- is related to
-
DERBY-789 Usability issue: "Constraints have the same set of columns"
- Open
- relates to
-
DERBY-3300 CREATE INDEX that matches an existing index succeeds with a 01504 warning but does not create the index.
- Open