db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2806) calling getByteLength on org.apache.derby.impl.jdbc.StoreStreamClob makes BinaryStream, fetched before this call, unusable
Date Wed, 13 Jun 2007 14:59:25 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan updated DERBY-2806:
-----------------------------------

    Attachment: derby-2806-1a.diff

Attached 'derby-2806-1a.diff', which is a first shot at this issue.

I consider separating the error reporting changes into a separate patch.
I have added a position-aware stream on top of the stream from store (OverflowInputStream),
which can reposition itself on request and also tell its current position.
It affects only Clob (I have overridden getStream() in SQLClob).

There seems to be a certain misfit in placement of the store class... I'm also not 100% certain
if more logic is needed to only ever return one instance of the PositionedStoreStream. Currently,
it is possible to call getStream() twice, get two instances of the positioned reader and then
make the out of sync with the underlying stream. I will investigate this.

Note that a positioned stream is only created on top of Resetable-streams.

Nice if anyone could take a look.

> calling getByteLength on org.apache.derby.impl.jdbc.StoreStreamClob makes BinaryStream,
fetched before this call, unusable
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2806
>                 URL: https://issues.apache.org/jira/browse/DERBY-2806
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.0.0
>            Reporter: Anurag Shekhar
>            Assignee: Kristian Waagan
>         Attachments: derby-2806-1a.diff
>
>
> StoreStreamClob.getByteLength first resets the internal stream and then reads the entire
stream. Due to this any read on Stream obtained by StoreStreamClob.getRawByteStream returns
-1.
> StoreStreamClob is a read only InternalClob, so probably keeping the length in a variable
will be good idea.

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


Mime
View raw message