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
http://www.nabble.com/Should-COLLATION-attribute-related-code-go-in-BasicDatabase--tf3397113.html#a9496608
(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: 10.3.1.2
>         Environment: Hard upgrade of 10.2 database.
>            Reporter: Øystein Grøvlen
>            Assignee: Mamta A. Satoor
>
> I create a database with 10.2.2.0 and then do a hard upgrade to 10.3.1.2:
> > java -jar db-derby-10.2.2.0-lib/lib/derbyrun.jar ij
> ij version 10.2
> ij> connect 'jdbc:derby:system/wombat;create=true';
> ij> exit;
> > java -jar db-derby-10.3.1.2-bin/lib/derbyrun.jar 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)
> FAILURES!!!
> 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.


Mime
View raw message