Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 9099 invoked from network); 14 Jun 2007 21:57:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 21:57:47 -0000 Received: (qmail 69537 invoked by uid 500); 14 Jun 2007 21:57:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 69511 invoked by uid 500); 14 Jun 2007 21:57:50 -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 69499 invoked by uid 99); 14 Jun 2007 21:57:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 14:57:50 -0700 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; Thu, 14 Jun 2007 14:57:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DE75D714159 for ; Thu, 14 Jun 2007 14:57:25 -0700 (PDT) Message-ID: <13406862.1181858245882.JavaMail.jira@brutus> Date: Thu, 14 Jun 2007 14:57:25 -0700 (PDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2806) calling getByteLength on org.apache.derby.impl.jdbc.StoreStreamClob makes BinaryStream, fetched before this call, unusable In-Reply-To: <32974163.1181631265853.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-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kristian Waagan updated DERBY-2806: ----------------------------------- Attachment: derby-2806-2a.stat derby-2806-2a.diff 'derby-2806-2a.diff' implements the required changes and adds a test case that demonstrates the bug/problem. Changes from the previous patch: * Instead of returning/creating the PositionedStoreStream in SQLClob, it is done in StoreStreamClob. This is better since it isolates the change more. * PositionedStoreStream no longer handle the encoded length. This was too specific, and should be handled in the next higher level instead. This allows it to be used for both Clob and Blob. * Removed some unrelated, though valid, changes regarding error reporting. I hope to address them in a separate Jira. Ran suites.All/derbyall without failures. > calling getByteLength on org.apache.derby.impl.jdbc.StoreStreamClob makes BinaryStream, fetched before this call, unusable > -------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-2806 > URL: https://issues.apache.org/jira/browse/DERBY-2806 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.2.2.0, 10.3.0.0 > Reporter: Anurag Shekhar > Assignee: Kristian Waagan > Fix For: 10.3.0.0 > > Attachments: derby-2806-1a.diff, derby-2806-2a.diff, derby-2806-2a.stat, Derby2806.java > > > StoreStreamClob.getByteLength first resets the internal stream and then reads the entire stream. Due to this any read on Stream obtained by StoreStreamClob.getRawByteStream returns -1. > StoreStreamClob is a read only InternalClob, so probably keeping the length in a variable will be good idea. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.