Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 49206 invoked from network); 7 Jul 2009 12:14:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 12:14:29 -0000 Received: (qmail 69436 invoked by uid 500); 7 Jul 2009 12:14:39 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 69404 invoked by uid 500); 7 Jul 2009 12:14:39 -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 69394 invoked by uid 99); 7 Jul 2009 12:14:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 12:14:39 +0000 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 12:14:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EB689234C1EA for ; Tue, 7 Jul 2009 05:14:14 -0700 (PDT) Message-ID: <1085570498.1246968854963.JavaMail.jira@brutus> Date: Tue, 7 Jul 2009 05:14:14 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3646) Embedded returns wrong results when selecting a blob column twice and using getBinaryStream() In-Reply-To: <339164868.1209139076138.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3646: -------------------------------------- Issue & fix info: [High Value Fix, Repro attached] (was: [High Value Fix]) Urgency: Normal Triaged for 10.5.2. > Embedded returns wrong results when selecting a blob column twice and using getBinaryStream() > --------------------------------------------------------------------------------------------- > > Key: DERBY-3646 > URL: https://issues.apache.org/jira/browse/DERBY-3646 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.1.3, 10.5.1.1 > Reporter: Kathey Marsden > Attachments: DoubleSelect.java > > > The attached program DoubleSelect selects a blob column twice and tries to access the blob column with getBinaryStream. > With embedded the output is: > 4 5 6 7 8 9 10 11 12 13 > 14 15 16 17 18 19 20 21 22 23 > I am done > Two things seem to be happening with embedded. > 1) Both getBinaryStream() calls are returning the same stream. > 2) The second getBinaryStream() call throws away 4 bytes. > With client the output is: > Exception in thread "main" java.io.IOException: The object is already > closed. > at > org.apache.derby.client.am.CloseFilterInputStream.read(CloseFilterInputStream.java:50) > at DoubleSelect.printNextTen(DoubleSelect.java:53) > at DoubleSelect.main(DoubleSelect.java:43) > 0 1 2 3 4 5 6 7 8 9 > So with client it looks like the second getBinaryStream() call closes > the first stream but then returns the right result for the second stream. > Perhaps embedded should behave the same as client or perhaps the query should just work. Regardless embedded should not return wrong results. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.