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

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

The top-level exception looks different in DERBY-2111 because older versions of 
Derby didn't chain exceptions. The stack traces of the underlying EOFExceptions 
look very similar in the two bug reports.

In DERBY-2111:

{noformat}
java.io.EOFException: Stream has already been read and end-of-file reached and 
cannot be re-used.
at 
org.apache.derby.iapi.types.ReaderToUTF8Stream.read(ReaderToUTF8Stream.java:185)
at 
org.apache.derby.impl.store.raw.data.MemByteHolder.write(MemByteHolder.java:146)
at 
org.apache.derby.impl.store.raw.data.RememberBytesInputStream.fillBuf(RememberBytesInputStream.java:135)
at 
org.apache.derby.impl.store.raw.data.StoredPage.logColumn(StoredPage.java:6155)
at org.apache.derby.impl.store.raw.data.StoredPage.logRow(StoredPage.java:3959)
at 
org.apache.derby.impl.store.raw.data.UpdateOperation.writeOptionalDataToBuffer(UpdateOperation.java:255)
at 
org.apache.derby.impl.store.raw.data.UpdateOperation.<init>(UpdateOperation.java:106)
at 
org.apache.derby.impl.store.raw.data.LoggableActions.actionUpdate(LoggableActions.java:80)
at 
org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(StoredPage.java:8537)
at 
org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(BasePage.java:1111)
at 
org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(GenericConglomerateController.java:479)
at 
org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(RowChangerImpl.java:523)
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:579)
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:273)
at 
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:358)
{noformat}

In this bug report:

{noformat}
Caused by: java.io.EOFException: Stream has already been read and end-of-file 
reached and cannot be re-used.
at org.apache.derby.iapi.types.ReaderToUTF8Stream.read(Unknown Source)
at org.apache.derby.impl.store.raw.data.MemByteHolder.write(Unknown Source)
at 
org.apache.derby.impl.store.raw.data.RememberBytesInputStream.fillBuf(Unknown 
Source)
at org.apache.derby.impl.store.raw.data.StoredPage.logColumn(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.logRow(Unknown Source)
at 
org.apache.derby.impl.store.raw.data.UpdateOperation.writeOptionalDataToBuffer(Unknown
 Source)
at org.apache.derby.impl.store.raw.data.UpdateOperation.<init>(Unknown Source)
at org.apache.derby.impl.store.raw.data.LoggableActions.actionUpdate(Unknown 
Source)
at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(Unknown 
Source)
at org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(Unknown Source)
at 
org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(Unknown
 Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(Unknown Source)
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown 
Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown 
Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
{noformat}

Since the test cases attached to the two bug reports essentially do the same 
thing (call setCharacterStream() on a parameter that will be needed more than 
once by the update statement), I think it is reasonable to treat them as two 
instances of the same underlying problem.

> Cannot update BLOB/CLOB values in multiple rows simultaneously
> --------------------------------------------------------------
>
>                 Key: DERBY-6681
>                 URL: https://issues.apache.org/jira/browse/DERBY-6681
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.9.1.0, 10.10.2.0
>            Reporter: Holger Rehn
>            Priority: Blocker
>         Attachments: MultiLOB.java
>
>
> When trying to execute a single command to update multiple rows with a new 
> BLOB/CLOB value, an exception is thrown because Derby tries to read the data 
> stream once for every value/row to update.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to