Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 272 invoked from network); 15 Jan 2009 17:04:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2009 17:04:39 -0000 Received: (qmail 91744 invoked by uid 500); 15 Jan 2009 17:04:39 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 91724 invoked by uid 500); 15 Jan 2009 17:04:39 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 91715 invoked by uid 99); 15 Jan 2009 17:04:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2009 09:04:39 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2009 17:04:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 504B0238887D; Thu, 15 Jan 2009 09:04:18 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r734758 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java Date: Thu, 15 Jan 2009 17:04:18 -0000 To: derby-commits@db.apache.org From: kristwaa@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090115170418.504B0238887D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kristwaa Date: Thu Jan 15 09:04:17 2009 New Revision: 734758 URL: http://svn.apache.org/viewvc?rev=734758&view=rev Log: DERBY-3907: Save useful length information for Clobs in store. Fixed a bug where the stream could be out of sync with the descriptor. Also corrected some indentation. Patch file: derby-3907-6a-SQLClob_stream_descriptor_sync.diff Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java?rev=734758&r1=734757&r2=734758&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLClob.java Thu Jan 15 09:04:17 2009 @@ -25,6 +25,7 @@ import org.apache.derby.iapi.jdbc.CharacterStreamDescriptor; +import org.apache.derby.iapi.services.io.InputStreamUtil; import org.apache.derby.iapi.services.io.StoredFormatIds; import org.apache.derby.iapi.services.sanity.SanityManager; @@ -245,9 +246,11 @@ if (stream instanceof Resetable) { try { ((Resetable)stream).resetStream(); - } catch (IOException ioe) { - throwStreamingIOException(ioe); - } + // Make sure the stream is in sync with the descriptor. + InputStreamUtil.skipFully(stream, csd.getCurBytePos()); + } catch (IOException ioe) { + throwStreamingIOException(ioe); + } } else { if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Unable to reset stream when " +