db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3238) When table contains large LOB values (> ~32K) trigger execution fails for that row with ERROR XCL30: An IOException was thrown when reading a 'BLOB'
Date Thu, 06 Dec 2007 00:27:43 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kathey Marsden updated DERBY-3238:
----------------------------------

    Attachment: derby-3238_10_1_diff.txt

Attached is a patch for version 10.1 for this issue.  In addition to the trunk patch, I had
to change SQLBlob.setWidth to not materialize the lob if the length is unknown.  This change
was checked into trunk with revision 437980 as part of DERBY-1417, but as far as I can tell
it is not dependent on the rest of that change.   Kristian, I would most appreciate if you
could confirm that this is the case.

The extra problem in 10.1 was that the "after" column was getting materialized with normalizeRow
 which called setWidth, so we were in a state where the before column was still pointing to
the stream, even though the after column had been materialized.  The error was occurring when
we tried to objectify the before column.  Eliminating the materialization with setWidth means
the stream has not been read when we call objectifyStream.  That in combination with the trunk
patch allows the test case to pass.

The reason the clob case was passing without the patch on 10.1 is that the before and after
columns were pointing to the same DataValueDescriptor.  That, I did not change and I am not
sure what problems that might cause, but for this case it worked to our advantage.

Tests are running on 10.1.

Kathey




> When table contains large LOB values (> ~32K) trigger execution fails for that row
with ERROR XCL30: An IOException was thrown when reading a 'BLOB' 
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3238
>                 URL: https://issues.apache.org/jira/browse/DERBY-3238
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.4.0.0
>            Reporter: Stan Bradbury
>            Assignee: Kathey Marsden
>             Fix For: 10.2.2.1, 10.3.2.2, 10.4.0.0
>
>         Attachments: blob_insert2.java, derby-3238_10_1_diff.txt, derby-3238_diff.txt,
derby-3238_diffv2.txt, derby-3238_diffv3.txt, derby-3238_diffv4.txt
>
>
> See attached test case.  
> At execution/run-time a trigger that handles a row that contains a large LOB value will
fail with the following error and stack trace:
>  = = =
> Testing blob of size=1024
>  . . Now executing update to fire the trigger
> PASSED
> Testing blob of size=16384
>  . . Now executing update to fire the trigger
> PASSED
> Testing blob of size=32658
>  . . Now executing update to fire the trigger
> PASSED
> Testing blob of size=32659
>  . . Now executing update to fire the trigger
> Error! java.sql.SQLException: An IOException was thrown when reading a 'BLOB' from an
InputStream.
> java.sql.SQLException: An IOException was thrown when reading a 'BLOB' from an InputStream.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
>         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
>         at blob_insert2.testBlob(blob_insert2.java:102)
>         at blob_insert2.main(blob_insert2.java:55)
> Caused by: java.sql.SQLException: Java exception: ': java.io.EOFException'.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
>         ... 9 more
> Caused by: java.io.EOFException
>         at org.apache.derby.iapi.types.SQLBinary.readBinaryLength(Unknown Source)
>         at org.apache.derby.iapi.types.SQLBinary.readExternal(Unknown Source)
>         at org.apache.derby.iapi.types.SQLBinary.getValue(Unknown Source)
>         at org.apache.derby.iapi.types.SQLBinary.loadStream(Unknown Source)
>         at org.apache.derby.impl.sql.execute.UpdateResultSet.objectifyStream(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.execute(Unknown Source)
>         ... 5 more

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