Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 73717 invoked from network); 7 Jul 2010 22:22:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 22:22:15 -0000 Received: (qmail 6276 invoked by uid 500); 7 Jul 2010 22:22:14 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 6249 invoked by uid 500); 7 Jul 2010 22:22:14 -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 6242 invoked by uid 99); 7 Jul 2010 22:22:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 22:22:14 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 22:22:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o67MLoRC008724 for ; Wed, 7 Jul 2010 22:21:50 GMT Message-ID: <10804773.248171278541310132.JavaMail.jira@thor> Date: Wed, 7 Jul 2010 18:21:50 -0400 (EDT) From: "Kathey Marsden (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 ] Kathey Marsden updated DERBY-3646: ---------------------------------- Assignee: Kathey Marsden assign to kmarsden to backport to 10.5 > 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 > Assignee: Kathey Marsden > Fix For: 10.6.1.0 > > 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.