db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6772) intermittent test failure in LangScripts schemas
Date Tue, 18 Nov 2014 22:02:33 GMT

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

Myrna van Lunteren commented on DERBY-6772:

Note that typically in this type of ordering issues we add an order by, but in this case,
that would be on descriptor which is of a data type that does not support order by (error
X0X67:  Columns of type 'org.apache.derby.catalog.IndexDescriptor' may not be used in CREATE
INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons
are not supported for that type.)

One solution would be to separately select the btree row and null rows.
Another option is to add a column of a type that supports order by into the query in such
a way that all 3 rows can be uniquely ordered. Looking at the available columns, I think adding
'isindex' will be suitable.

> intermittent test failure in LangScripts schemas
> ------------------------------------------------
>                 Key: DERBY-6772
>                 URL: https://issues.apache.org/jira/browse/DERBY-6772
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>         Environment: windows 2008, ibm 1.7
>            Reporter: Myrna van Lunteren
> I saw a failure in LangScripts schemas.sql on a trunk test run on windows 2008 with ibm
> {noformat}
> 1) schemas(org.apache.derbyTesting.functionTests.tests.lang.LangScripts)junit.framework.ComparisonFailure:
Output at line 477 expected:<...                   |[BTREE (1)]      > but was:<...
                  |[NULL     ]      >
> 	at org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon(CanonTestCase.java:110)
> 	at org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(ScriptTestCase.java:201)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:120)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:443)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:460)
> 	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:58)
> {noformat}
> See: http://people.apache.org/~myrnavl/derby_test_results/main/windows/testSummary-1639825.html
> Without code changes this same test passed fine with other jvms.
> The diff is resulting from this query:
> {noformat}
> select schemaname, tablename, descriptor as descr
> from sys.sysschemas s, sys.sysconglomerates c , sys.systables t
> where CAST(t.tablename AS VARCHAR(128)) = 'SAMPLETAB'
>         and s.schemaid = c.schemaid
>         and c.tableid = t.tableid
> order by schemaname, tablename;
> {noformat}
> This gives three rows: In the master file (removed some spaces for display):
> {noformat}
> -------------------------------------------------------------------------
> APP                     |SAMPLETAB        |NULL
> TEST                   |SAMPLETAB        |BTREE (1)
> TEST                   |SAMPLETAB        |NULL
> {noformat}
> In the failed situation, the 'TEST' rows are ordered differently.

This message was sent by Atlassian JIRA

View raw message