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 "Kristian Waagan (JIRA)" <ji...@apache.org> on 2008/12/02 23:06:44 UTC

[jira] Created: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

PositionedStoreStream doesn't initialize itself properly
--------------------------------------------------------

                 Key: DERBY-3970
                 URL: https://issues.apache.org/jira/browse/DERBY-3970
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.4.2.0, 10.3.3.0
            Reporter: Kristian Waagan
            Assignee: Kristian Waagan
            Priority: Minor


When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.

A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
  rs.getClob(1).length();
  rs.getClob(1).getSubString(...);

A symptom of out of sync stream states is EOFException on a valid request.
I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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


[jira] Updated: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3970:
-----------------------------------

    Fix Version/s: 10.4.2.1

Backported fix 1a to 10.4 with revision 725286.
Regression tests ran cleanly on the 10.4 branch.

> PositionedStoreStream doesn't initialize itself properly
> --------------------------------------------------------
>
>                 Key: DERBY-3970
>                 URL: https://issues.apache.org/jira/browse/DERBY-3970
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.0.0
>
>         Attachments: derby-3970-1a-PositionedStoreStream_init.diff.txt
>
>
> When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
> Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.
> A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
>   rs.getClob(1).length();
>   rs.getClob(1).getSubString(...);
> A symptom of out of sync stream states is EOFException on a valid request.
> I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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


[jira] Commented: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655215#action_12655215 ] 

Kristian Waagan commented on DERBY-3970:
----------------------------------------

The patch cannot be backported cleanly to 10.3, and I suggest not to hand merge to get the fix into the branch.
If anyone disagrees, I think a manual merge is relatively easy. In general, the LOB machinery has now changed so much that it's getting hard to backport the fixes to 10.3.

Unless I hear anything, I will close the issue in a few days.

> PositionedStoreStream doesn't initialize itself properly
> --------------------------------------------------------
>
>                 Key: DERBY-3970
>                 URL: https://issues.apache.org/jira/browse/DERBY-3970
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.0.0
>
>         Attachments: derby-3970-1a-PositionedStoreStream_init.diff.txt
>
>
> When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
> Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.
> A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
>   rs.getClob(1).length();
>   rs.getClob(1).getSubString(...);
> A symptom of out of sync stream states is EOFException on a valid request.
> I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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


[jira] Updated: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3970:
-----------------------------------

    Attachment: derby-3970-1a-PositionedStoreStream_init.diff.txt

Patch 1a performs the initialization in the constructor and adjusts the calling code.
It also removed the resetting of the position variable in initStream, as only the first call will actually ensure the position of the underlying stream is set to zero. Subsequent calls are no-ops.

Patch ready for review.

> PositionedStoreStream doesn't initialize itself properly
> --------------------------------------------------------
>
>                 Key: DERBY-3970
>                 URL: https://issues.apache.org/jira/browse/DERBY-3970
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3970-1a-PositionedStoreStream_init.diff.txt
>
>
> When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
> Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.
> A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
>   rs.getClob(1).length();
>   rs.getClob(1).getSubString(...);
> A symptom of out of sync stream states is EOFException on a valid request.
> I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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


[jira] Closed: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan closed DERBY-3970.
----------------------------------

    Resolution: Fixed

Closing issue.

> PositionedStoreStream doesn't initialize itself properly
> --------------------------------------------------------
>
>                 Key: DERBY-3970
>                 URL: https://issues.apache.org/jira/browse/DERBY-3970
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.0.0
>
>         Attachments: derby-3970-1a-PositionedStoreStream_init.diff.txt
>
>
> When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
> Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.
> A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
>   rs.getClob(1).length();
>   rs.getClob(1).getSubString(...);
> A symptom of out of sync stream states is EOFException on a valid request.
> I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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


[jira] Updated: (DERBY-3970) PositionedStoreStream doesn't initialize itself properly

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3970:
-----------------------------------

           Derby Info:   (was: [Patch Available])
    Affects Version/s: 10.5.0.0
        Fix Version/s: 10.5.0.0

Tests ran without errors (derbyall, suites.All).

Committed patch 1a to trunk with revision 722812.

> PositionedStoreStream doesn't initialize itself properly
> --------------------------------------------------------
>
>                 Key: DERBY-3970
>                 URL: https://issues.apache.org/jira/browse/DERBY-3970
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3970-1a-PositionedStoreStream_init.diff.txt
>
>
> When a PositionedStoreStream is created on top of a stream from store, it must properly initialize itself.
> Proper initialization consists of initializing and resetting the stream to make sure the states of the streams are in sync.
> A case of out of sync stream states was detected in a test where the Clob reference wasn't kept, but a new Clob object was created for each operation, i.e:
>   rs.getClob(1).length();
>   rs.getClob(1).getSubString(...);
> A symptom of out of sync stream states is EOFException on a valid request.
> I don't think the access style above is supposed to work, but the proper initialization should be performed anyway.

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