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

Kristian Waagan commented on DERBY-3705:
----------------------------------------

The patch looks good to me, and is basically ready for commit.
We do try to keep lines under 80 characters long, so you might want to reformat 
the lines that are longer than that.

I also assume the regression test for this issue will be found in the test you 
are working on converting?

As an extra step later on, one could also refactor the client code and create a 
method that checks the maximum and minimum length. Currently the code is 
duplicated in a number of methods.
I also notice that there is a try-catch for SqlException, but that 'throw new 
SqlException(...).getSQLException()' is used within. It would be good to either 
get rid of the try-catch blocks or not use the getSQLException method.

I have started the regression tests and will report back when they are done.

> In Net Client mode, negative values for stream length are accepted without an 
> exception for PreparedStatement.setAsciiStream()
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3705
>                 URL: https://issues.apache.org/jira/browse/DERBY-3705
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.4.1.3, 10.5.0.0
>         Environment: Windows XP SP2, Derby trunk SVN checkout
>            Reporter: Suran Jayathilaka
>            Assignee: Suran Jayathilaka
>            Priority: Minor
>         Attachments: derby-3705.diff
>
>
> This is related to Cloudscape bug 4250.
> Pass negative length as the stream length for various setXXXStream methods 
> should throw an exception. But in Net Client mode, passing a negative value 
> as stream length to PreparedStatement.setAsciiStream() doesn't throw an 
> exception.
> e.g. //from store/StreamingColumn
> PreparedStatement ps = prepareStatement("insert into "
>                               + "testLongVarCharInvalidStreamLength11 
> values(?, ?, ?)");
>               ps.setInt(1, 100);
>               try {
>                       println("===> testing using setAsciiStream with -2 as 
> length");
>                       ps.setAsciiStream(2, fileIn, -2); // should throw 
> exception here but doesn't.
>                  }
> This issue has been fixed for embedded mode, but not for client mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to