Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 15454 invoked from network); 19 Jul 2006 17:41:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2006 17:41:26 -0000 Received: (qmail 51612 invoked by uid 500); 19 Jul 2006 17:41:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 51394 invoked by uid 500); 19 Jul 2006 17:41:25 -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 51385 invoked by uid 99); 19 Jul 2006 17:41:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 10:41:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 10:41:24 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2EF0714204 for ; Wed, 19 Jul 2006 17:39:14 +0000 (GMT) Message-ID: <2292834.1153330754730.JavaMail.jira@brutus> Date: Wed, 19 Jul 2006 10:39:14 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-721) State of InputStream retrieved from resultset is not clean , if there exists previous InputStream . In-Reply-To: <689224072.1132572282060.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 [ http://issues.apache.org/jira/browse/DERBY-721?page=all ] Kathey Marsden updated DERBY-721: --------------------------------- Derby Info: [Existing Application Impact, Release Note Needed] I think this change may affect existing applicaitons. Because of the fact that the InputStream retrieved from resultset is not clean , we now throw an exception if the user gest the stream for a value in result set twice. Typically this would mean they were getting wrong results before if they retrieved the stream more than once. Now they will get an exception which is correct but may be surprising to users that are now seeing this new symptom. A formal release note still needs to be added. > State of InputStream retrieved from resultset is not clean , if there exists previous InputStream . > --------------------------------------------------------------------------------------------------- > > Key: DERBY-721 > URL: http://issues.apache.org/jira/browse/DERBY-721 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Environment: naka@rufelza:~/derby/dev/trunk$ cat /proc/version > Linux version 2.6.12-1-386 (horms@tabatha.lab.ultramonkey.org) (gcc version 4.0.2 20050917 (prerelease) (Debian 4.0.1-8)) #1 Tue Sep 27 12:41:08 JST 2005 > naka@rufelza:~/derby/dev/trunk$ java -version > java version "1.4.2_10" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) > Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode) > Reporter: Tomohito Nakayama > Assigned To: Tomohito Nakayama > Fix For: 10.2.0.0 > > Attachments: DERBY-721.patch, DERBY-721_2.patch, DERBY-721_3.patch, DERBY-721_4.patch, DERBY-721_5.patch, DERBY-721_rollback_1+2.patch, testLob.java, testLob2.java, testResult.txt, testResult2.txt > > > State of InputStream retrieved from ResultSet was not clean , if there exists previous InputStream retrieved from ResultSet . > Test code ... > PreparedStatement pst = conn.prepareStatement("insert into a(b) values(?)"); > byte[] data = new byte[1024 * 1024]; > for(int i = 0; > i < 1024 * 1024; > i ++){ > data[i] = (byte)(i % 256); > } > pst.setBinaryStream(1,new ByteArrayInputStream(data),data.length); > pst.executeUpdate(); > pst.close(); > > > st = conn.createStatement(); > ResultSet rs = st.executeQuery("select b from a"); > rs.next(); > > InputStream is = rs.getBinaryStream(1); > System.out.println("Here goes first stream"); > System.out.println(is.read()); > System.out.println(is.read()); > System.out.println(is.read()); > > is = rs.getBinaryStream(1); > System.out.println("Here goes 2nd stream"); > System.out.println(is.read()); > System.out.println(is.read()); > System.out.println(is.read()); > Result .... > naka@rufelza:~/derby/test/20051121$ java testLob > Here goes first stream > 0 > 1 > 2 > Here goes 2nd stream > 7 > 8 > 9 > It is expected that result printed from first stream is as same as result printed from 2nd. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira