You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <ji...@apache.org> on 2008/04/01 18:02:24 UTC
[jira] Commented: (DERBY-3583) Derby should throw a better error
message if a BLOB/CLOB column is accessed more than once
[ https://issues.apache.org/jira/browse/DERBY-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584193#action_12584193 ]
Kathey Marsden commented on DERBY-3583:
---------------------------------------
When I implemented this change I saw test failures when caling getClob() more than once, for example in BlobClob4BLOBTest
if (origRS.getClob(1) != null) {
assertEquals("FAIL - Invalid checksum for row trigger",
getStreamCheckSum(origRS.getClob(1).getAsciiStream()),
getStreamCheckSum(trigARS.getClob(1).getAsciiStream()));
I guess that DERBY-2892 by itself does not restrict multiple calls to getClob() or getBlob(), but only restricts getString(), getBytes(), getCharacterStream() and getBinaryStream(), because they free the locator. I wonder if this change should restrict getBlob() and getClob() calls as well or should it continue to allow multiple calls. Thoughts?
> Derby should throw a better error message if a BLOB/CLOB column is accessed more than once
> ------------------------------------------------------------------------------------------
>
> Key: DERBY-3583
> URL: https://issues.apache.org/jira/browse/DERBY-3583
> Project: Derby
> Issue Type: Improvement
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Priority: Minor
>
> With the DERBY-2892 fix revision 642974, users can no longer access a BLOB/CLOB column more than once for each row. Currently the error message is
> XJ217 - You cannot invoke other java.sql.Clob/java.sql.Blob methods after calling the free() method or after the Blob/Clob's transaction has been committed or rolled back.
> I don't know that that makes sense given the user called getString()
> For getCharacterStream()/getBinaryStream() there is no error on the call, just an IOException on the read.
> We should throw a clearer error message, that the user is not allowed to make multiple getXXX calls on a BLOB/CLOB column for each row.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.