db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiago R. Espinha (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3574) 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
Date Mon, 07 Apr 2008 13:49:24 GMT

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

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

I have read your solution for this issue although I have thought of something different, and
perhaps you can tell me which would be more correct. Keep in mind I still haven't tested this
one solution either.

What if instead of setting lengthObtained_ to false in a free() method on the Lob, we would,
instead, extract the isValid property of Clob and Blob to its parent class, the Lob and set
it to false on that free() method?

Then when we call sqlLength() on the Lob we could do something like:
if(lengthObtained_ && isValid) return sqlLength_;


I'm just suggesting this solution because it seems more correct to me than just resetting
lengthObtained_ to false. By doing this we're pretty much just fooling the mechanism that
deals with cache instead of actually checking whether the Lob is valid or not (i.e. whether
it has been free()'d or not). What method should I look into doing?

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


Mime
View raw message