db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2711) If large blob is updated after InputStream is fetched (using getBinaryStream), the stream continues to point ot old data
Date Mon, 28 May 2007 09:01:30 GMT

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

Anurag Shekhar updated DERBY-2711:
----------------------------------

    Attachment: derby-2711.diff

I have introduced a new stream class UpdateableBlobStream to handle the switching from dvd
stream to LOBInputStream.
blob.getBinaryStream now returns UpdateableBlobStream is the blob is not yet materialized.
This stream keeps tracks of current position of the stream, and checks if blob is materialized
since it was last accessed. If the blob is materialized it gets the stream again from blob
and updates the stream and sets the position of the stream by calling skip. If the blob has
been truncated and now is smaller than the current position user will get an IOException.

Modified Files
  java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
         getBinaryStream now returns UpdateableBlobStream if the blob is not materialized.
New File
   java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java
         This class handles the switching from dvd stream to LOBInputStream

Tests
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java
 Added a new test to test switching from dvd stream to LOBInputStream.
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
  Added an entry for BlobUpdateableStreamTest.java


 

> If large blob is updated after InputStream is fetched (using getBinaryStream), the stream
continues to point ot old data
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2711
>                 URL: https://issues.apache.org/jira/browse/DERBY-2711
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2711.diff
>
>
> While using a large blob (so that blob doesn't gets materialized while fetching from
database) getBinaryStream returns stream linked to dvd. After blob is is updated internally
the blob data is materialized in LOBStreamControl class but the stream continues to point
to dvd hence giving out old data.

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