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

Knut Anders Hatlen commented on DERBY-3574:
-------------------------------------------

Thanks for the patch. From a quick look, I have these comments:

* Connection.java:
The transactionID variable is only incremented on explicit commit. I think it 
should also be incremented when the transaction is auto-committed or aborted. 
Perhaps it's better to do it in Connection.completeLocalCommit() and 
Connection.completeLocalRollback() instead of Connection.commit()?

* Lob.java:
I feel that the check belongs in checkValidity() rather than in sqlLength(). 
Wouldn't it be possible to move the isValid flag and the checkValidity() method 
from Blob/Clob into Lob? They do exactly the same work in Blob and Clob, so 
there's no reason why we can't move them into the Lob class.

> 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-connection-java.patch, 
> derby3574-lob-java.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