db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2940) CollationTest fail after hard upgrade from 10.2
Date Wed, 18 Jul 2007 18:34:04 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513677

Mamta A. Satoor commented on DERBY-2940:

Oystein, I did some research into this issue. The failure in the CollationTest on a hard-upgraded
pre-10.3 database is because we are testing the derby.database.collation property of the database
and expecting it to be UCS_BASIC. But in a hard-upgraded database, this property does not
exist and hence we get NULL rather than UCS_BASIC. More info below.

This behavior is based on the decision made in following thread
(Mike's mail on March 21st 2007 had raised the question of what would happen if no derby.database.collation
property is found in soft upgrade mode. We had to code such that in soft upgrade mode, we
should be able to interpret pre-10.3 databases to have a collation of UCS_BASIC when no derby.database.collation
exists. And hence to make the code work for both soft and hard upgrade mode, we decided not
to add derby.database.collation property with value of UCS_BASIC) So, the behavior you are
noticing of derby.database.collation property having a value of NULL after a hard upgrade
of pre-10.3 database is expected behavior. In my codeline, I changed the CollationTest to
comment out checking of derby.database.collation value and then the rest of the test ran fine
on a hard-upgraded database. 

Please let me know if you have further questions.

> CollationTest fail after hard upgrade from 10.2
> -----------------------------------------------
>                 Key: DERBY-2940
>                 URL: https://issues.apache.org/jira/browse/DERBY-2940
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions:
>         Environment: Hard upgrade of 10.2 database.
>            Reporter: Øystein Grøvlen
>            Assignee: Mamta A. Satoor
> I create a database with and then do a hard upgrade to
> > java -jar db-derby- ij
> ij version 10.2
> ij> connect 'jdbc:derby:system/wombat;create=true';
> ij> exit;
> > java -jar db-derby- ij
> ij version 10.3
> ij> connect 'jdbc:derby:system/wombat;upgrade=true';
> ij> exit;
> If I then run the CollationTest, I get:
> There was 1 failure:
> 1) testDefaultCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)junit.framework.AssertionFailedError:
Column value mismatch @ column '1', row 1:
>     Expected: >UCS_BASIC<
>     Found:    >null<
>         at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:873)
>         at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:766)    
   at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:704)        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:662)
       at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.checkLangBasedQuery(CollationTest.java:1014)
>         at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.testDefaultCollation(CollationTest.java:104)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
>         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)
> Tests run: 4,  Failures: 1,  Errors: 0
> If I create the database with 10.3 before running the test, the tests suceeds.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message