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 "Anurag Shekhar (JIRA)" <ji...@apache.org> on 2007/06/13 19:28:25 UTC
[jira] Created: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
-----------------------------------------------------------------------------------------------------------
Key: DERBY-2812
URL: https://issues.apache.org/jira/browse/DERBY-2812
Project: Derby
Issue Type: Bug
Components: JDBC
Affects Versions: 10.2.2.0, 10.3.0.0
Reporter: Anurag Shekhar
Assignee: Anurag Shekhar
Attachments: Derby2806.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2812) Assessing blob (when its linked to
DVD stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505154 ]
Kristian Waagan commented on DERBY-2812:
----------------------------------------
I had a look at 'derby-2812v2.diff'. I also ran suites.All with Java 1.5, and it completed without failures.
As far as I can see, all my comments are additional improvements and nitpicks.
Comments/questions:
1) Since AutoPositioningStream extends BinaryToRawStream, can we be sure a non-store stream is never passed in? What's the consequence if it happens? (i.e. will the length be set to undetermined, or will the RawToBinaryStream fail?) I do see there is an assert in EmbedBlob, I was just thinking in more general terms.
If AutoPositioningStream is only supposed to work on top of a PositionedStoreStream, maybe it should enforce that? As far as I can tell, it is not able to support the intended functionality if the passed in stream is not a PositionedStoreStream.
2) I think conChild, positionedStream and stream can be made final.
3) Some typos in the constructor JavaDoc (and "operation" -> "operations" in the class JavaDoc).
4) In skip, I don't think InputStream.skip is allowed to return < 0, and so the if (ret > 0) could be removed. It is not incorrect to have it, it might just be unnecessary.
5) Some trailing spaces on three "empty" lines.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: derby-2812-testsuites.diff, derby-2812.diff, derby-2812v2.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2812:
----------------------------------
Attachment: derby-2812v2.diff
In my previous patch, by mistake I included the release notes I was working on. Please ignore patch and consider derby-2812v2.diff for review/commit.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: derby-2812.diff, derby-2812v2.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan closed DERBY-2812.
----------------------------------
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.1.4
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.1.4
>
> Attachments: derby-2812-testsuites.diff, derby-2812.diff, derby-2812v2.diff, derby-2812v3.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2812:
----------------------------------
Attachment: derby-2812-testsuites.diff
description of derby-2812-testsuites.diff
I have added a new test MultiStreamLobTest under jdbcapi. It extracts two stream for blob and compares the two. It has a similar test for clob where it extracts two reader and compares them.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: derby-2812-testsuites.diff, derby-2812.diff, derby-2812v2.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2812:
----------------------------------
Attachment: Derby2806.java
Reproducible for both 2806 and this issue.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2812:
----------------------------------
Attachment: derby-2812v3.diff
1) Since AutoPositioningStream extends BinaryToRawStream, can we be sure a non-store stream is never passed in? What's the consequence if it happens? (i.e. will the length be set to undetermined, or will the RawToBinaryStream fail?) I do see there is an assert in EmbedBlob, I was
In this patch derby-2812v3.diff i have addressed Kristian's comments
1. Enforcing PositionedStoreStream in AutoPositioningStream using SanityMagaer.assert
2) I think conChild, positionedStream and stream can be made final.
removed stream other two are final now
3) Some typos in the constructor JavaDoc (and "operation" -> "operations" in the class JavaDoc).
fixed typos
4) In skip, I don't think InputStream.skip is allowed to return < 0, and so the if (ret > 0) could be removed. It is not incorrect to have it, it might just be unnecessary.
fixed
5) Some trailing spaces on three "empty" lines.
thanks for the review
fixed
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: derby-2812-testsuites.diff, derby-2812.diff, derby-2812v2.diff, derby-2812v3.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-2812) Assessing blob (when its linked to
DVD stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan resolved DERBY-2812.
------------------------------------
Resolution: Fixed
Fix Version/s: 10.3.0.0
Thanks for the updated patch Anurag.
I ran suites.All and derbyall without failures.
Committed 'derby-2812v3.diff' to trunk with revision 547704.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2812-testsuites.diff, derby-2812.diff, derby-2812v2.diff, derby-2812v3.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2812) Assessing blob (when its linked to DVD
stream, ie large blob) corrupts stream fetched prior to this access.
Posted by "Anurag Shekhar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Shekhar updated DERBY-2812:
----------------------------------
Attachment: derby-2812.diff
Description of Patch
This patch makes use of PositionedStoreStream intoroduced in
derby-2806. I have introduced a wrapper AutoPositioningStream
for PositionedStoreStream. This class checks if PositionedStoreStream
has moved to a new postition since last read or seek and sets
it to back to the right position if it has.
There repositioning and actual operation on PositionedStoreStream
is performed within a synchrnized block synchrnizing on Connection Syncroniation object to avoid race condition.
Class AutoPositioningStream extends from BinaryToRawStream to
skip the length information from PositionedStoreStream. I feel the
this class can be merged with BinaryToRawStream but wanted to
avoid making any change in BinaryToRawStream as this class is used
by few more classes (ResultSet and Statement) and we are too close
to deadline.
Modified classes
java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
EmbedBlob now wraps stream retrieved from dvd before storing the
refrence locally.
In getBinaryStream method it constructos and passes
AutoPositioningStrea as argument to UpdateableBlobStream.
java/engine/org/apache/derby/impl/jdbc/BinaryToRawStream.java
BinaryToRawStream is not final as AutoPositioningStream extends
from it. I plan to merger these two classes in a latter patch after 10.3
release branch is cut.
java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java
UpdateableBlobStream was wrongly calling super.read in
read (byte [], int, int) method fixed it to call to stream instead.
> Assessing blob (when its linked to DVD stream, ie large blob) corrupts stream fetched prior to this access.
> -----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2812
> URL: https://issues.apache.org/jira/browse/DERBY-2812
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Attachments: derby-2812.diff, Derby2806.java
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.