Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81398 invoked from network); 12 May 2009 18:24:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 May 2009 18:24:10 -0000 Received: (qmail 67881 invoked by uid 500); 12 May 2009 18:24:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 67837 invoked by uid 500); 12 May 2009 18:24:09 -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 67829 invoked by uid 99); 12 May 2009 18:24:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 18:24:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Tue, 12 May 2009 18:24:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8ECC0234C004 for ; Tue, 12 May 2009 11:23:45 -0700 (PDT) Message-ID: <1641148821.1242152625573.JavaMail.jira@brutus> Date: Tue, 12 May 2009 11:23:45 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4226) Column updatability wrong in corner case with explicit FOR UPDATE OF In-Reply-To: <1146926382.1242151786167.JavaMail.jira@brutus> 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-4226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-4226: --------------------------------- Attachment: repro.diff Uploading a patch to SURTest.java (repro.diff) which shows the issue. > Column updatability wrong in corner case with explicit FOR UPDATE OF > ---------------------------------------------------------------------------------- > > Key: DERBY-4226 > URL: https://issues.apache.org/jira/browse/DERBY-4226 > Project: Derby > Issue Type: Bug > Components: JDBC, SQL > Reporter: Dag H. Wanvik > Priority: Minor > Attachments: repro.diff > > > The first of the two queries below allow updating column 3 in the result set; > rs.updateInt(3, ) > the second query does saying, giving 42X31 (embedded) and XJ124 (client). > It seems they should have the same updatability for column 3: > SELECT id,a,id from t1 for update > SELECT id,a,id from t1 for update of id > This is the case both for TYPE_FORWARD_ONLY and TYPE_SCROLL_INSENSITIVE result sets. > Both queries allow the first column (first instance of id) to be updated. > In the cases that work, if the rs is scroll insensitive, *both* instances of id are updated and will show the new value if read back after updateRow has been performed. > It is not obvious, perhaps, if updating column 3 should be allowed (if so, only if column 1 is not updated?) > or, maybe the behavior should be that only the column that is actually updated (in a scrollable insensitive result set) should be updated, i.e. any other instances would not reflect the change unless they are themselves updated. > Note that any expressions dependent on the column are *not* recomputed, i.e. > select id, i+4 > will not show a changed value of id+4 in an updatable scrollable result set, if id is updated. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.