db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject [Fwd: [Fwd: [PATCH] Derby-250 With client setObject( parameterIndex, x, java.sql.DOUBLE) throws conversion exception if the object passed is a BigDecimal with more than 31 digits]]
Date Tue, 03 May 2005 05:38:44 GMT
Patch applied as revision 167863

After applying this I saw one additional error in the derbynetclientmats 
testsuite:

*** Start: dataSourcePermissions_net jdk1.4.2_07 DerbyNetClient 
derbynetmats:derbynetmats 2005-05-02 21:58:40 ***
25a26
 > org.apache.derby.iapi.services.context.ShutdownException:
28a30
 > agentThread[DRDAConnThread_3,5,derby.daemons]
Test Failed.
*** End:   dataSourcePermissions_net jdk1.4.2_07 DerbyNetClient 
derbynetmats:derbynetmats 2005-05-02 21:58:57 ***

I committed anyway as I think Kathey is better placed to diagnose what 
might be causing it (and because she has more tests to run anyway :-) ).

--
Jeremy

-------- Original Message --------
Subject: [Fwd: [PATCH]  Derby-250 With client setObject( parameterIndex, 
x, java.sql.DOUBLE) throws conversion exception if the object passed is 
a BigDecimal with more than 31 digits]
Date: Mon, 02 May 2005 14:23:40 -0700
From: Kathey Marsden <kmarsdenderby@sbcglobal.net>
To: jboynes@apache.org


Here is the patch.  I have some test  changes that I can easily check in
after you check this one in.

Thanks!

Kathey


-------- Original Message --------
Subject: 	[PATCH] Derby-250 With client setObject( parameterIndex, x,
java.sql.DOUBLE) throws conversion exception if the object passed is a
BigDecimal with more than 31 digits
Date: 	Fri, 29 Apr 2005 05:57:08 -0700
From: 	Kathey Marsden <kmarsdenderby@sbcglobal.net>
Reply-To: 	Derby Development <derby-dev@db.apache.org>
To: 	Derby Development <derby-dev@db.apache.org>



This is a patch for Derby-250 to eliminate the conversion error when a
BigDecimal with more than
31 digits is  passed to setObject  with a targetSqlType.
public void setObject(int parameterIndex,
                       Object x,
                       int targetSqlType)
                throws SQLException
or
public void setObject(int parameterIndex,
                       Object x,
                       int targetSqlType,
                       int scale)
                throws SQLException

The approach of the patch is to have setObject calls with a
targetSqlType  to always convert before sending to the value to the
server for all types.

Taking this approach exposed other issues with  the client's conversion
mechanism for Date, Time and Timestamp,
which were customized valueOf  methods to support ISO format.   Since
the extended format is not needed for Derby, I replaced these with the
standard <Date|Time|TimeStamp>.valueOf calls.

The patch also fixes issues with scale getting set properly when
specified for these calls.

I'll commit this afternoon if there are no objections.

Thanks

Kathey






Mime
View raw message