Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 24110 invoked from network); 1 Dec 2007 00:19:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2007 00:19:08 -0000 Received: (qmail 12758 invoked by uid 500); 1 Dec 2007 00:18:55 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 12729 invoked by uid 500); 1 Dec 2007 00:18:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 12719 invoked by uid 99); 1 Dec 2007 00:18:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2007 16:18:54 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Dec 2007 00:19:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5C4F871420A for ; Fri, 30 Nov 2007 16:18:43 -0800 (PST) Message-ID: <24443167.1196468323374.JavaMail.jira@brutus> Date: Fri, 30 Nov 2007 16:18:43 -0800 (PST) From: "Mike Matrigali (JIRA)" To: derby-dev@db.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' In-Reply-To: <27994201.1196460643070.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Matrigali updated DERBY-3238: ---------------------------------- I think long term a fix along the lines of 1 would be great, and probably more appropriate for a future feature release. It seems like trigger access code could be optimized if we had new complile time code which gathered all the following: 1) which columns are ever accessed for both before and after values in the trigger. 2) in case of after values, which columns actually may change as part of the update (maybe we have this - i don't know). Then execution code could be changed to not have to deal with any columns that the trigger need ever access. But if the goal is to get a fix for existing release, I think something along the lines of your #2 suggestion would be fine. I assume the problem is that when we "copy" the datavaluedescriptor to the "after" column we do a "shallow" copy. Then subsequently we drain the stream for the before rows, leaving the shallow copy thinking it has a stream when it really does not. So if you can get the objectify to happen on the before column before the copy things should work right. > 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 > Attachments: blob_insert2.java > > > 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.