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

Rick Hillegas commented on DERBY-5045:
--------------------------------------

In a side conversation with Knut (which I am now bringing back to the 
community) it seemed that this test failure is evidence for a pre-existing bug 
in the cleanup after DROP TABLE. When a table is dropped, its dependent objects 
(like rows in SYSSTATISTICS) should be dropped too. The relationships between 
catalogs are not enforced by foreign keys. That is because the DataDictionary 
lives beneath the SQL layer. It is expected that the dependencies between 
catalogs will be handled by the DataDictionary itself. It seems that there may 
be a bug in the logic which keeps SYSTABLES and SYSSTATISTICS in sync. The 
UpdateStatisticsTest appears to trigger this bug occasionally.

> Assert failures in UpdateStatisticsTest
> ---------------------------------------
>
>                 Key: DERBY-5045
>                 URL: https://issues.apache.org/jira/browse/DERBY-5045
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>              Labels: derby_triage10_8
>
> I saw these failures when running suites.All against revision 1070949 + the 
> 1b patch attached to DERBY-642:
> junit.framework.AssertionFailedError: Index statistics for <ALL TABLES>
> 1: {tableId=94a458d3-012e-2a1f-d23d-ffff93077fa3, tableName=<n/a>, 
> indexName=<n/a>, lcols=1, rows=160, unique/card=160, created=2011-02-15 
> 17:31:00.951}
>  expected:<0> but was:<1>
>       at 
> org.apache.derbyTesting.junit.IndexStatsUtil.assertStats(IndexStatsUtil.java:132)
>       at 
> org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStats(IndexStatsUtil.java:109)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics(UpdateStatisticsTest.java:91)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> junit.framework.AssertionFailedError: Index statistics for <ALL TABLES>
> 1: {tableId=94a458d3-012e-2a1f-d23d-ffff93077fa3, tableName=<n/a>, 
> indexName=<n/a>, lcols=1, rows=160, unique/card=160, created=2011-02-15 
> 17:31:00.951}
>  expected:<0> but was:<1>
>       at 
> org.apache.derbyTesting.junit.IndexStatsUtil.assertStats(IndexStatsUtil.java:132)
>       at 
> org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStats(IndexStatsUtil.java:109)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics(UpdateStatisticsTest.java:91)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>       at junit.extensions.TestSetup.run(TestSetup.java:27)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to