Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 42395 invoked from network); 23 Aug 2006 20:22:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 20:22:29 -0000 Received: (qmail 97935 invoked by uid 500); 23 Aug 2006 20:22:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97841 invoked by uid 500); 23 Aug 2006 20:22:28 -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 97809 invoked by uid 99); 23 Aug 2006 20:22:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 13:22:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.1.36] (HELO gmpea-pix-1.sun.com) (192.18.1.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 13:22:25 -0700 Received: from d1-emea-10.sun.com ([192.18.2.120]) by gmpea-pix-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k7NKM2Zr027897 for ; Wed, 23 Aug 2006 21:22:04 +0100 (BST) Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0J4G00G01WH13A00@d1-emea-10.sun.com> (original mail from Andreas.Korneliussen@Sun.COM) for derby-dev@db.apache.org; Wed, 23 Aug 2006 21:22:02 +0100 (BST) Received: from [10.0.0.4] ([80.202.31.203]) by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0J4G00FJJWKLZRSF@d1-emea-10.sun.com> for derby-dev@db.apache.org; Wed, 23 Aug 2006 21:22:02 +0100 (BST) Date: Wed, 23 Aug 2006 22:24:12 +0200 From: Andreas Korneliussen Subject: Re: Question on SUR and U lock. In-reply-to: <44EC9300.2080007@gmail.com> Sender: Andreas.Korneliussen@Sun.COM To: derby-dev@db.apache.org Message-id: <44ECB96C.3070805@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.94.1.0 References: <44EC9300.2080007@gmail.com> User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sunitha Kambhampati wrote: > I was doing some testing for SUR and had a question about the expected > behavior. > > The SUR related doc on > http://db.apache.org/derby/docs/dev/devguide/rdevconceptssur.html says > "The row which the cursor is positioned on is locked, however once it > moves to another row, > the lock may be released depending on transaction isolation level." > > In my test (isolation level is default - RC), I have a SUR, resultset > has 1000 rows, all rows are materialized by calling absolute(-1). After > this the cursor is positioned before the first row by calling > beforeFirst(). Printing the locktable shows > 1)a IX lock on the table, which is fine. > 2)U row lock on the table. Why do we hold the U lock when the cursor is > not positioned on any row ?. Hi, Thanks for testing SUR. This is not as it was intendended to be, and I have already filed a bug report: DERBY-1696 "transaction may sometimes keep lock on a row after moving off the resultset in scrollable updatable resultset" Hopefully it can be fixed for 10.2 Regards Andreas