[
https://issues.apache.org/jira/browse/DERBY-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586395#action_12586395
]
V.Narayanan commented on DERBY-3574:
------------------------------------
>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?
I think this is a very good solution because you do not need to make a stored
procedure
call to determine that Lob is no longer valid. (unnecessary round trip to the
server).
>Then when we call sqlLength() on the Lob we could do something like:
>if(lengthObtained_ && isValid) return sqlLength_;
I think here if isValid is false you should do this
throw new SqlException(null,new ClientMessageId(SQLState.LOB_OBJECT_INVALID))
.getSQLException();
> 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.