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] Updated: (DERBY-988) jdbcapi/parameterMapping.java fails on Win2003 with 'P3=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.'
Date Wed, 10 Mar 2010 13:17:27 GMT

     [ https://issues.apache.org/jira/browse/DERBY-988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-988:
-------------------------------------

    Attachment: D988.java

This test does not fail anymore in no_NO locale because DERBY-323 made all tests in the old
framework run with -Duser.language=en -Duser.country=US, and because DERBY-2333 rewrote it
to JUnit, probably without preserving the logic that detected unexpected success.

I'm attaching a stand-alone test case that reproduces this problem on head of trunk. It runs
the same sequence of commands first with locale en_US and then with locale no_NO. Here's the
output I see with Java 1.7.0-ea-b85 on OpenSolaris:

> Running test in locale en_US...
> cs.getTime(2) failed: java.sql.SQLDataException: The syntax of the string representation
of a datetime value is incorrect.
> cs.getTime(3) failed: java.sql.SQLDataException: The syntax of the string representation
of a datetime value is incorrect.
>
> Running test in locale no_NO...
> cs.getTime(2) returned 13:26:42
> cs.getTime(3) failed: java.sql.SQLDataException: The syntax of the string representation
of a datetime value is incorrect.

The value returned for parameter 2 (an INOUT parameter of type CHAR(60)) is the string "13:26:42P2-PMAP",
which I believe is supposed to raise an exception when converted to java.sql.Time regardless
of locale. So I think we have a bug here.

The parameter that fails in both locales (#3, an OUT parameter of type CHAR(60)) contains
the string "P3-PMAP". If I change it to return "13:26:42P3-PMAP", it fails too, so the problem
is not limited to INOUT.

> jdbcapi/parameterMapping.java fails on Win2003 with 'P3=SQLSTATE(22007): SQL Exception:
The syntax of the string representation of a datetime value is incorrect.'
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-988
>                 URL: https://issues.apache.org/jira/browse/DERBY-988
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.2.1.6
>         Environment: OS: Microsoft(R) Windows(R) Server 2003, - 5.2.3790 Service Pack
1 Build 3790 - CYGWIN_NT-5.2 1.5.12(0.116/4/2) 2004-11-10 08:34 Cygwin, JVM: Sun Microsystems
Inc. 1.5.0_04
>            Reporter: Ole Solberg
>            Priority: Minor
>         Attachments: D988.java
>
>
> "Signature":
> ********* Diff file jdbcapi/jdbcapi/parameterMapping.diff
> *** Start: parameterMapping jdk1.5.0_04 jdbcapi:jdbcapi 2006-02-14 22:02:02 ***
> 1918a1919,1922
> > P2=cs.getTime=13:26:42 was null false
> > P3=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a
datetime value is incorrect.
> > INOUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> > OUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> 1920,1922d1923
> < INOUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> < OUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> < P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a
datetime value is incorrect.
> 2152a2154,2157
> > P2=cs.getTime=13:26:42 was null false
> > P3=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a
datetime value is incorrect.
> > INOUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> > OUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> 2154,2156d2158
> < INOUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> < OUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
> < P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a
datetime value is incorrect.
> Test Failed.
> *** End:   parameterMapping jdk1.5.0_04 jdbcapi:jdbcapi 2006-02-14 22:03:09 ***
> http://www.multinet.no/~solberg/public/Apache/Derby/Limited/testSummary-377800.html [CYGWIN_NT-5.2
i686-unknown]

-- 
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