Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44782 invoked from network); 19 Feb 2011 19:26:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Feb 2011 19:26:04 -0000 Received: (qmail 88485 invoked by uid 500); 19 Feb 2011 19:26:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 88304 invoked by uid 500); 19 Feb 2011 19:26:03 -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 88295 invoked by uid 99); 19 Feb 2011 19:26:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Feb 2011 19:26:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Feb 2011 19:26:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 482EA1ADFB8 for ; Sat, 19 Feb 2011 19:25:39 +0000 (UTC) Date: Sat, 19 Feb 2011 19:25:39 +0000 (UTC) From: "C.S. Nirmal J. Fernando (JIRA)" To: derby-dev@db.apache.org Message-ID: <415822416.3265.1298143539292.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (DERBY-3573) Argument checking for ResultSet.setFetchSize(int) is incorrect 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-3573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996841#comment-12996841 ] C.S. Nirmal J. Fernando commented on DERBY-3573: ------------------------------------------------ Thanks Knut! But seems like no failures in StatementJdbc20Test.java ! Glad if someone can review the patch! Thanks. > Argument checking for ResultSet.setFetchSize(int) is incorrect > -------------------------------------------------------------- > > Key: DERBY-3573 > URL: https://issues.apache.org/jira/browse/DERBY-3573 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Affects Versions: 10.3.1.4, 10.3.2.1 > Reporter: Dyre Tjeldvoll > Assignee: C.S. Nirmal J. Fernando > Priority: Minor > Labels: derby_triage10_8 > Attachments: derby-3573-a.diff > > > The requirement that the argument to ResultSet.setFetchSize(int) be less than Statement.getMaxRows() was dropped in Java 6/JDBC 4, (it is not present in the Java 6 javadoc, but can still be seen in the Java 5 javadoc). > The reason why the client driver doesn't throw an exception in this case is because am.ResultSet incorrectly checks against ResultSet.maxRows_ and NOT am.Statement.getMaxRows(). So when am.Statement.setMaxRows(int) is called after a result set has already been created, am.ResultSet.setFechSize(int) will check against a stale value. > The question is what to do about this. The client driver clearly has a bug, but should we fix it by duplicating the old behavior found in the embedded driver, or change both drivers to comply with latest spec which allows any non-negative value as argument to ResultSet.setFetchSize(int)? -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira