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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2011/03/30 13:55:05 UTC

[jira] [Commented] (DERBY-2515) Network client does not retain the INOUT parameter value change for subsequent execution

    [ 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