[ http://issues.apache.org/jira/browse/DERBY-1421?page=all ]

Fernanda Pizzorno updated DERBY-1421:
-------------------------------------

    Attachment: derby-1421.diff
                derby-1421.stat

ResultSet.updateBinaryStream() fails for scrollable updatable result sets 
because of a call to the method ExecRow.clone() that fails. When the clone 
method in the SQLBinary column is called, the stream has already been read and 
is closed, and an attempt to read this closed stream causes an exception. The 
streams used in this case are of type RemeberBytesInputStream. This type of 
stream keeps a copy of every byte that has been read or skipped, and can be 
re-read using a "replay" stream.

This patch (derby-1421.diff) fixes this problem by using the "replay" stream to 
get the data, if the stream has previously been read. I have successfully run 
derbyall with this patch. Can someone please review it?

Thank you in advance.

> ResultSet.updateBinaryStream fails when the result type is 
> TYPE_SCROLL_INSENSITIVE
> ----------------------------------------------------------------------------------
>
>          Key: DERBY-1421
>          URL: http://issues.apache.org/jira/browse/DERBY-1421
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Reporter: V.Narayanan
>     Assignee: Fernanda Pizzorno
>  Attachments: TestUpdateBinaryStream.java, derby-1421.diff, derby-1421.stat
>
> Attaching test program for the above bug. The program however works fine when 
> the ResultSetType is TYPE_FORWARD_ONLY.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to