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 "Mamta A. Satoor (JIRA)" <de...@db.apache.org> on 2006/05/16 18:09:07 UTC
[jira] Commented: (DERBY-655) getImportedKeys returns duplicate
rows in some cases
[ http://issues.apache.org/jira/browse/DERBY-655?page=comments#action_12412003 ]
Mamta A. Satoor commented on DERBY-655:
---------------------------------------
I was able to reduce the test case provided to following set of sql which will reproduce the erroneous behavior in Derby 10.0.
CREATE TABLE t1(c11_ID BIGINT NOT NULL);
CREATE TABLE t2 (c21_ID BIGINT NOT NULL primary key);
ALTER TABLE t1 ADD CONSTRAINT F_12 Foreign Key (c11_ID)
REFERENCES t2 (c21_ID) ON DELETE CASCADE ON UPDATE NO ACTION;
CREATE TABLE t3(c31_ID BIGINT NOT NULL primary key);
ALTER TABLE t2 ADD CONSTRAINT F_443 Foreign Key (c21_ID)
REFERENCES t3(c31_ID) ON DELETE CASCADE ON UPDATE NO ACTION;
If DatabaseMetaData.getImportedKeys is run against table t1, Derby 10.0 will run 2 rows and Cloudscape 5.2 will run 1 row.
> getImportedKeys returns duplicate rows in some cases
> ----------------------------------------------------
>
> Key: DERBY-655
> URL: http://issues.apache.org/jira/browse/DERBY-655
> Project: Derby
> Type: Bug
> Components: SQL
> Versions: 10.2.0.0
> Environment: Sun JDK 1.4.2, Windows XP
> Reporter: Deepa Remesh
> Assignee: Mamta A. Satoor
> Attachments: bigdb.sql, keys.java, keys_test.zip, smalldb.sql
>
> I have a database with a large number of tables. I get duplicate rows when I call DatabaseMetaData.getImportedKeys for a particular table. However, if I create the same table with same number of foreign keys in another database (which has fewer number of tables), then getImportedKeys returns me the correct number of rows. This error seems to happen only when the database has a large number of tables. I will attach a repro for this shortly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira