Uploaded image for project: 'Derby'
  1. Derby
  2. 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'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.3.1, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.4.1.3
    • 10.1.3.2, 10.2.2.1, 10.3.3.0, 10.4.1.3
    • SQL
    • None
    • Patch Available

    Description

      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

      Attachments

        1. blob_insert2.java
          4 kB
          Sun Seng David Tan
        2. derby-3238_diff.txt
          7 kB
          Katherine Marsden
        3. derby-3238_diffv2.txt
          7 kB
          Katherine Marsden
        4. derby-3238_diffv3.txt
          7 kB
          Katherine Marsden
        5. derby-3238_diffv4.txt
          10 kB
          Katherine Marsden
        6. derby-3238_10_1_diff.txt
          13 kB
          Katherine Marsden

        Activity

          People

            kmarsden Katherine Marsden
            stan Sun Seng David Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: