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 "Rick Hillegas (JIRA)" <de...@db.apache.org> on 2006/07/28 17:40:14 UTC

[jira] Commented: (DERBY-1510) 'SQLBinary.readFromStream' can enter endless loop

    [ http://issues.apache.org/jira/browse/DERBY-1510?page=comments#action_12424111 ] 
            
Rick Hillegas commented on DERBY-1510:
--------------------------------------

Seems simple enough. Committed at subversion revision 426570.

> 'SQLBinary.readFromStream' can enter endless loop
> -------------------------------------------------
>
>                 Key: DERBY-1510
>                 URL: http://issues.apache.org/jira/browse/DERBY-1510
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, SQL
>    Affects Versions: 10.2.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-1510-1a.diff
>
>
> Under certain circumstances, the method 'SQLBinary.readFromStream' can enter an endless loop while reading the stream. The following must be true for the bug to occur: 
>  * There must be more data in the stream than what can fit into the initial buffer (32 K).
>  * The method 'available' of the stream returns 0.
> Since the default return value for 'InputStream.available' is 0, and the method reading the stream can be used for data types CHAR FOR BIT DATA, VARCHAR FOR BIT DATA and LONG VARCHAR FOR BIT DATA, the bug should be fixed. The maximum length is 32700 bytes.
> The method will also be used by SQLBlob, but it may be better to introduce a new streaming method for it, since the current implementation has memory-problems for large data (materializes the whole stream). A separate issue should/will be created for this.
> The symptom for this bug is a hang when calling one of the execute methods of Prepared- or CallableStatement and maybe also certain set methods in ResultSet.
> The visibility of this bug is very low, but the impact is severe/critical. When the JDBC 4 length less streaming overloads are added (DERBY-1417), visibility might increase.

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