db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Mason" <b.ma...@adinstruments.com>
Subject Possible SYSCS_COMPRESS_TABLE bug
Date Mon, 24 May 2010 05:44:02 GMT
Hi there,

I think I have encountered a bug in Derby and I just wanted to check if this
was already a known issue.

It appears that running SYSCS_UTIL.SYSCS_COMPRESS_TABLE on a table with a
null-able unique constraint will disable the unique constraint. The script
below should reproduce the problem. The expected behaviour is for the second
insert to fail due to the unique constraint but instead it is allowed. The
second insert will fail as expected either if the call to
SYSCS_COMPRESS_TABLE is skipped or if the column is declared NOT NULL.

I have reproduced the problem using embedded Derby 10.5.1.1, 10.5.3.0 and
10.6.1.0 using ij.

If this turns out to be a new bug I am happy to enter it in JIRA.

Thanks,
Brett.


CREATE TABLE TABLE1(NAME1 INT UNIQUE);

CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'TABLE1', 1);

INSERT INTO TABLE1(NAME1) VALUES(1);

INSERT INTO TABLE1(NAME1) VALUES(1);

SELECT * FROM TABLE1;

DROP TABLE TABLE1;


Mime
View raw message