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-2515) Network client does not retain the INOUT parameter value change for subsequent execution
Date Wed, 30 Mar 2011 11:55:05 GMT

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

Knut Anders Hatlen commented on DERBY-2515:
-------------------------------------------

Hi Rick,

Thanks for fixing this bug. I have two questions about the patch:

1)
+                    //
+                    // special case to coerce Integer to Short for SMALLINT
+                    //
+                    if ( parameterMetaData_.types_[ i ] == Types.SMALLINT )
+                    {
+                        if ( (returnArg != null) && (returnArg instanceof Integer)
)
+                        {
+                            returnArg = new Short( ((Integer) returnArg).shortValue() );
+                        }
+                    }

When we get here, have we already checked that the Integer argument fits in a SMALLINT, or
do we risk that Integer.shortValue() silently truncates the original value?

2)
+        } catch (Exception se)
+        {
+            throw new IllegalArgumentException( se.getMessage() );
+        }

What kind of exceptions do we expect here, and why convert to IllegalArgumentException? Is
that something expected by the higher levels of the code?

> Network client does not retain the INOUT parameter value change for subsequent execution
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2515
>                 URL: https://issues.apache.org/jira/browse/DERBY-2515
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Kathey Marsden
>            Priority: Minor
>              Labels: derby_triage10_8
>             Fix For: 10.8.0.0
>
>         Attachments: Test_2515.java, derby-2515-01-ac-copyINOUTreturnValues.diff
>
>
>  If I set a INOUT parameter to a value (say 12.3) and it gets 
> modified by the procedure to another value (say 45.6) then on 
> the next execution
>      of the same CallableStatement, embedded maintains the 
> current value (45.6), while network server reverts to the 
> former value (12.3).  
> This issue was found while converting the test lang/procedure.java.  See references to
this issue in the converted LangProcedureTest.java

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

Mime
View raw message