You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jeremy Boynes <jb...@apache.org> on 2005/05/03 07:38:44 UTC

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

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 <km...@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 <km...@sbcglobal.net>
Reply-To: 	Derby Development <de...@db.apache.org>
To: 	Derby Development <de...@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






Re: [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]]

Posted by Jeremy Boynes <jb...@apache.org>.
Kathey Marsden wrote:
> Jeremy Boynes wrote:
> 
> 
>>I attached derby.log if it is of any use.
>>
> 
> The trace  be in the dataSourcePermissions_net.tmp file in the test
> output directory.
> Even if there is not a trace the tmp file should give us an idea of how
> far it got before things went south.
> 
> 

I reran the suite and the problem went away :-(

I'll let you know if I see anything like it again.
--
Jeremy

Re: [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]]

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jeremy Boynes wrote:

> I attached derby.log if it is of any use.
>
The trace  be in the dataSourcePermissions_net.tmp file in the test
output directory.
Even if there is not a trace the tmp file should give us an idea of how
far it got before things went south.



Re: [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]]

Posted by Jeremy Boynes <jb...@apache.org>.
Kathey Marsden wrote:
> 
> Thanks Jeremy,
> 
> I don't see this failure and am not sure how the setObject changes could
> have impacted this test.  Maybe it's an intermittent failure we need to
> look at. 
> 

It could be - I see we have a different JVM level and I was also 
disconnected from the network when I ran the tests; I am also on WinXP.

> *** Start: dataSourcePermissions_net jdk1.4.2_03 DerbyNetClient
> 2005-05-03 05:24:57 ***
> Initialize for framework: DerbyNetClient
> startServer = false. Bypass server startup
> *** End:   dataSourcePermissions_net jdk1.4.2_03 DerbyNetClient
> 2005-05-03 05:25:31 ***
> 
> Could you send the trace from the dataSourcePermissions_net.tmp file if
> there is one?
> 

I could not see one - I attached derby.log if it is of any use.

--
Jeremy

Re: [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]]

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jeremy Boynes wrote:

> 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 ***
>
Thanks Jeremy,

I don't see this failure and am not sure how the setObject changes could
have impacted this test.  Maybe it's an intermittent failure we need to
look at. 

*** Start: dataSourcePermissions_net jdk1.4.2_03 DerbyNetClient
2005-05-03 05:24:57 ***
Initialize for framework: DerbyNetClient
startServer = false. Bypass server startup
*** End:   dataSourcePermissions_net jdk1.4.2_03 DerbyNetClient
2005-05-03 05:25:31 ***

Could you send the trace from the dataSourcePermissions_net.tmp file if
there is one?

Thanks

Kathey