Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 49774 invoked from network); 5 Dec 2005 23:25:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 23:25:05 -0000 Received: (qmail 12913 invoked by uid 500); 5 Dec 2005 23:25:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 12870 invoked by uid 500); 5 Dec 2005 23:25:04 -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 12779 invoked by uid 99); 5 Dec 2005 23:25:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 15:25:03 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 15:25:02 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id jB5NOfiY021320 for ; Mon, 5 Dec 2005 18:24:41 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id jB5NOfRO112594 for ; Mon, 5 Dec 2005 18:24:41 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id jB5NOenh023612 for ; Mon, 5 Dec 2005 18:24:40 -0500 Received: from [127.0.0.1] (sig-9-48-125-175.mts.ibm.com [9.48.125.175]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id jB5NOcXR023535 for ; Mon, 5 Dec 2005 18:24:40 -0500 Message-ID: <4394CC35.1040403@sbcglobal.net> Date: Mon, 05 Dec 2005 15:24:37 -0800 From: Mike Matrigali Reply-To: mikem_app@sbcglobal.net User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: [jira] Updated: (DERBY-721) State of InputStream retrieved from resultset is not clean , if there exists previous InputStream . References: <1661600910.1133590410615.JavaMail.jira@ajax.apache.org> <4394781C.4020307@sbcglobal.net> <4394A0F9.2060003@debrunners.com> In-Reply-To: <4394A0F9.2060003@debrunners.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is there anything in the standard that says what the second call to the get the stream has to do? Imagine the case where the first stream reads 1 gig of a 2 gig blob, does the second call to getBinaryStream() have to return the 1st gig again? Any change that tries to cache the bytes returned by the first getBinaryStream either in local client or network client code is going to be a performance/memory drain. /mikem Daniel John Debrunner wrote: > Mike Matrigali wrote: > >>I am new to this issue and have not reviewed the patch yet. I am just >>trying to understand what the correct behavior is. If this has >>already been discussed feel free to point that out.I know Sunitha >>submitted some fixes in this area, but she will not be able to look >>at these for awhile. >> >>In your test it is obvious that the first instance of the stream can >>not be used anymore since you use the same variable. What if the >>test instead did: >> >>InputStream is1 = rs.getBinaryStream(1); >>System.out.println("Here goes first stream"); >>System.out.println(is1.read()); >>System.out.println(is1.read()); >>System.out.println(is1.read()); >> >>InputStream is2 = rs.getBinaryStream(1); >>System.out.println("Here goes 2nd stream"); >>System.out.println(is2.read()); >>System.out.println(is2.read()); >>System.out.println(is2.read()); >> >>System.out.println("Here goes first stream continuing"); >>System.out.println(is1.read()); >>System.out.println(is1.read()); >>System.out.println(is1.read()); > > > The second call to getBinaryStream is required to close the first stream. > > Dan. > > >