[
https://issues.apache.org/jira/browse/DERBY-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588069#action_12588069
]
espinha edited comment on DERBY-3574 at 4/11/08 12:27 PM:
-------------------------------------------------------------------
I have just talked with Kathey on IRC and here's the main topics:
1) Initially, with my patch, if you tried to invoke length() on a Lob (over a
connection that had been closed), you'd get the INVALID_LOB exception instead
of the expected NO_CURRENT_CONNECTION.
2) The testB/ClobAfterCommit() was always passing because it wasn't replicating
the original issue: cached results. Therefore a change was made so that
length() is invoked before the commit(), caching the result, and it is then
invoked for real after the commit(), where it should throw the expected
exception.
3) To fix the problem in point 1, checkValidity() was changed once again, to
include a checkForClosedConnection() .
All the tests in BlobClob4BlobTest are successful now, and these changes are
available on the latest patch (including the regression test changes).
was (Author: espinha):
I have just talked with Kathey on IRC and here's the main topics:
1) Initially, with my patch, if you tried to invoke length() on a Lob, you'd
get the INVALID_LOB exception instead of the expected NO_CURRENT_CONNECTION.
2) The testB/ClobAfterCommit() was always passing because it wasn't replicating
the original issue: cached results. Therefore a change was made so that
length() is invoked before the commit(), caching the result, and it is then
invoked for real after the commit(), where it should throw the expected
exception.
3) To fix the problem in point 1, checkValidity() was changed once again, to
include a checkForClosedConnection() .
All the tests in BlobClob4BlobTest are successful now, and these changes are
available on the latest patch (including the regression test changes).
> With client, attempting to get the lob length after commit or connection
> close if there was a call to length() before commit does not throw an
> exception
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3574
> URL: https://issues.apache.org/jira/browse/DERBY-3574
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Network Client, Newcomer
> Affects Versions: 10.5.0.0
> Reporter: Kathey Marsden
> Assignee: Tiago R. Espinha
> Priority: Trivial
> Attachments: derby3574-wtest.patch, derby3574.patch,
> TestLobLength.java
>
>
> Attempting to get call Blob/Clob.length() after commit or connection close
> does not fail if there was a previous call to length(). If no previous call
> was made an exception is thrown as expected.
> See attached program TestLobLength for repro with commit. If you comment out
> the two lines to get the length before the commit we get the expected
> exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.