Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23313 invoked from network); 4 Nov 2005 18:30:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Nov 2005 18:30:36 -0000 Received: (qmail 22158 invoked by uid 500); 4 Nov 2005 18:30:35 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 22128 invoked by uid 500); 4 Nov 2005 18:30:35 -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 22119 invoked by uid 99); 4 Nov 2005 18:30:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 10:30:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.110.152] (HELO e34.co.us.ibm.com) (32.97.110.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 10:30:29 -0800 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id jA4IUCBc024891 for ; Fri, 4 Nov 2005 13:30:12 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id jA4IUCnC517974 for ; Fri, 4 Nov 2005 11:30:12 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id jA4IUCdi009586 for ; Fri, 4 Nov 2005 11:30:12 -0700 Received: from [127.0.0.1] (DMCSDJDT41P.usca.ibm.com [9.72.133.129]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id jA4IUBtY009551 for ; Fri, 4 Nov 2005 11:30:11 -0700 Message-ID: <436BA88E.1020903@debrunners.com> Date: Fri, 04 Nov 2005 10:29:34 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: [jira] Updated: (DERBY-231) "FOR UPDATE" required for updatable result set to work References: <1423548905.1113999264585.JavaMail.jira@ajax.apache.org> <1821373379.1130947796422.JavaMail.jira@ajax.apache.org> <20051103001306.GB5919@barbar.sun.com> <436951E6.7000701@debrunners.com> <436A1825.2000708@sun.com> <436A5A76.2000706@debrunners.com> <20051103223528.GA6087@barbar.sun.com> <436AD2E6.9070108@debrunners.com> <20051104091550.GB21210@atum01.norway.sun.com> In-Reply-To: <20051104091550.GB21210@atum01.norway.sun.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii 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 Bernt M. Johnsen wrote: > Thus when you in JDBC writes > > PreparedStatement p = c.prepareStatement("SELECT * FROM T"); > ResultSet rs = p.executeQuery(); > > it is equivalent to > > PreparedStatement p = c.prepareStatement("SELECT * FROM T", > ResultSet.TYPE_FORWARD_ONLY, > ResultSet.CONCUR_READ_ONLY); > ResultSet rs = p.executeQuery(); > > which again should be equivalent something like > > PREPARE p FROM SELECT * FROM T FOR READ ONLY; > DECLARE rs NO SCROLL CURSOR FOR p; That's the leap of faith I have trouble with. The assumption that the read only of the result set means read only status of the SQL query. I see the ResultSet.CONCUR_READ_ONLY only applying to the client side ResultSet, because that's what it is declared to mean. public static final int CONCUR_READ_ONLY The constant indicating the concurrency mode for a ResultSet object that may NOT be updated. And we have instances where we know the ResultSet being read only does not make the SQL query read only, when the select includes the FOR UPDATE. Dan.