[ 
https://issues.apache.org/jira/browse/DERBY-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586542#action_12586542
 ] 

Tiago R. Espinha commented on DERBY-3574:
-----------------------------------------

Apparently there's more to it. I've just implemented and tested this solution 
and the fact is that the TestLobLength still manages to request the length of 
the Clob, after the transaction has been committed.

I found one thing: The Clobs effectively *aren't* being free()'d when a commit 
is issued on the connection they're bound with. I temporarily encapsulated 
isValid with a public method and I found out that it is true before we issue 
the commit, and it remains true after as well.

The bottom-line is: do we want the Clobs (and Lobs in general) to be free()'d 
upon the commit? If we don't, then Narayanan's solution will certainly fix this 
issue (since it doesn't rely on the "validity" of the Lob) and this problem 
gets dealt with quickly. If we do want them free()'d, then the problem runs 
deeper than just some work on *lob.java .

Some thoughts please?

> 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: derby-3574.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.

Reply via email to