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-5420) TableLockBasicTest is locale sensitive: failed with Norwegian locale on Windows.
Date Fri, 23 Sep 2011 08:28:28 GMT

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

Knut Anders Hatlen commented on DERBY-5420:

Just a thought... What if we change the message text of the RTS_OPT_EST_RC message in messages.xml

    <text>optimizer estimated row count</text>
    <text>optimizer estimated row count: {0,number,###########0.00}</text>

and in RealBasicNoPutResultSetStatistics.dumpEstimatedCosts() from

				MessageService.getTextMessage(SQLState.RTS_OPT_EST_RC) +
					": " +
				formatDouble(optimizerEstimatedRowCount) + "\n" +
				MessageService.getTextMessage(SQLState.RTS_OPT_EST_RC, new Double(optimizerEstimatedRowCount))
+ "\n" +

Similar changes would be needed for RTS_OPT_EST_COST too.

Then we avoid the need to explicitly create and cache a DecimalFormat instance, and the number
will be formatted using the same locale as the rest of the message (the database locale).
And we can remove the formatDouble() method, so we'll reduce the code size too.

> TableLockBasicTest is locale sensitive: failed with Norwegian locale on Windows.
> --------------------------------------------------------------------------------
>                 Key: DERBY-5420
>                 URL: https://issues.apache.org/jira/browse/DERBY-5420
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>         Environment: Windows Vista SP2, Norwegian locale, JDK 7.
>            Reporter: Dag H. Wanvik
>            Priority: Minor
> The execution plans are asserted in this test and I saw this diff:
> Expected:
>         :
> 	optimizer estimated row count:            6.00
> 	optimizer estimated cost:          100.40<
> Found:
>         :
>         optimizer estimated row count:            6,00
> 	optimizer estimated cost:          100,40<
> the latter using a decimal comma whereas a decimal point is expected.

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


View raw message