db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6342) failure in testConstraintDrops(org.apache.derbyTesting.functionTests.lang.ConglomerateSharingTest)junit.framework.AssertionFailedError: Error 23505 should have been caused by index/constraint...
Date Mon, 07 Jul 2014 14:02:34 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053673#comment-14053673
] 

Knut Anders Hatlen commented on DERBY-6342:
-------------------------------------------

The failing insert statement seems to violate two constraints: DROPC_UIX2 (unique index on
column C) and DROPC_UC1 (unique constraint on column C). The test expects it to fail because
of the violation of the unique index, but I don't think that's guaranteed.

As far as I can see, InsertResultSet inserts the row into each backing index in the order
that they are returned by TableDescriptor.getConglomerateDescriptors(), and the error message
will contain the name of the first index that reports a violation. The table descriptor gets
the conglomerate descriptors from DataDictionaryImpl.getConglomerateDescriptorsScan(), which
uses the index identified by SYSCONGLOMERATES_INDEX3_ID. That index has only one key column:
TABLEID. This means the order of a specific table's indexes is undefined, which would explain
why the error message could vary.

The error Myrna reported on 08/Apr/14, mentions another constraint: DROPC_FK2 (a foreign key
on C). Although the insert statement doesn't violate the foreign key, the backing index of
the foreign key is probably a unique index because the column C is unique. I think this error
could happen if DataDictionaryImpl.getConglomerateDescriptorsScan() sees DROPC_FK2 before
DROPC_UIX2 and DROPC_UC1.

> failure in testConstraintDrops(org.apache.derbyTesting.functionTests.lang.ConglomerateSharingTest)junit.framework.AssertionFailedError:
Error 23505 should have been caused by index/constraint...
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6342
>                 URL: https://issues.apache.org/jira/browse/DERBY-6342
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.10.2.0
>         Environment: weme6.2 Windows Server 2008 - x86 - 6.1 build 7601 Service Pack
1
> Windows machine
>            Reporter: Mamta A. Satoor
>
> Don't think this failure has been reported before.
> The url for failure is http://people.apache.org/~myrnavl/derby_test_results/v10_10/windows/testlog/weme6.2/1520721-suites.All_diff.txt
> 1) testConstraintDrops(org.apache.derbyTesting.functionTests.tests.lang.ConglomerateSharingTest)junit.framework.AssertionFailedError:
Error 23505 should have been caused by index/constraint 'DROPC_UIX2' but 'DROPC_UIX2' did
not appear in the following error message: "The statement was aborted because it would have
caused a duplicate key value in a unique or primary key constraint or unique index identified
by 'DROPC_UC1' defined on 'DROPC_T2'."
> 	at org.apache.derbyTesting.functionTests.tests.lang.ConglomerateSharingTest.checkStatementError(ConglomerateSharingTest.java:762)
> 	at org.apache.derbyTesting.functionTests.tests.lang.ConglomerateSharingTest.testConstraintDrops(ConglomerateSharingTest.java:272)
> 	at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:195)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:442)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:459)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message