Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 61302 invoked from network); 8 Dec 2008 16:45:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2008 16:45:11 -0000 Received: (qmail 60915 invoked by uid 500); 8 Dec 2008 16:45:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 60885 invoked by uid 500); 8 Dec 2008 16:45:22 -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 60821 invoked by uid 99); 8 Dec 2008 16:45:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2008 08:45:22 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2008 16:45:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6A899234C33A for ; Mon, 8 Dec 2008 08:44:46 -0800 (PST) Message-ID: <1643108699.1228754686435.JavaMail.jira@brutus> Date: Mon, 8 Dec 2008 08:44:46 -0800 (PST) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-1799) SUR: current row not locked when renavigating to it, in queries with indexes In-Reply-To: <22457771.1157100862274.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-1799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden reassigned DERBY-1799: ------------------------------------- Assignee: (was: Fernanda Pizzorno) > SUR: current row not locked when renavigating to it, in queries with indexes > ---------------------------------------------------------------------------- > > Key: DERBY-1799 > URL: https://issues.apache.org/jira/browse/DERBY-1799 > Project: Derby > Issue Type: Bug > Components: SQL, Store > Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4 > Reporter: Andreas Korneliussen > Attachments: derby-1799.diff, derby-1799.stat > > > This problem is detected in transactions with isolation level read-committed/read-uncommitted. > We have a table (T) which has a primary key (a), and a query which does "select A from T" (an indexed select) > If the result set is scrollable updatable, we expect the current row to be locked with an update lock. This does not seem to happen when repositioning to a row which has been already been fetched previously. > The result is that either the wrong row is locked, or if the result set has been on after last position, no row is locked. > Output from ij: > ij> get scroll insensitive cursor c1 as 'select a from t for update'; > ij> next c1; > A > ----------- > 1 > ij> select * from SYSCS_DIAG.LOCK_TABLE; > XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 243 |ROW |U |T |(1,7) |GRANT|T |1 |NULL > 243 |ROW |S |T |(1,1) |GRANT|T |1 |SQL060901103455010 > 243 |TABLE|IX |T |Tablelock |GRANT|T |4 |NULL > 3 rows selected > ij> after last c1; > No current row > ij> previous c1; > A > ----------- > 3 > ij> select * from SYSCS_DIAG.LOCK_TABLE; > XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 243 |TABLE|IX |T |Tablelock |GRANT|T |4 |NULL > 1 row selected > The last select shows that no row is locked at this point, however we expect one row to be locked. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.