Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 16075 invoked from network); 1 Sep 2006 14:14:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 14:14:47 -0000 Received: (qmail 90765 invoked by uid 500); 1 Sep 2006 14:14:47 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90556 invoked by uid 500); 1 Sep 2006 14:14:46 -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 90547 invoked by uid 99); 1 Sep 2006 14:14:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 07:14:46 -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; Fri, 01 Sep 2006 07:14:45 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 519777142F2 for ; Fri, 1 Sep 2006 14:11:23 +0000 (GMT) Message-ID: <24038443.1157119883331.JavaMail.jira@brutus> Date: Fri, 1 Sep 2006 07:11:23 -0700 (PDT) From: "Fernanda Pizzorno (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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1799?page=all ] Fernanda Pizzorno reassigned DERBY-1799: ---------------------------------------- Assignee: Fernanda Pizzorno > SUR: current row not locked when renavigating to it, in queries with indexes > ---------------------------------------------------------------------------- > > Key: DERBY-1799 > URL: http://issues.apache.org/jira/browse/DERBY-1799 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.1.0, 10.3.0.0, 10.2.2.0 > Reporter: Andreas Korneliussen > Assigned To: Fernanda Pizzorno > > 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. - 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