Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 6964 invoked from network); 3 Aug 2006 17:20:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Aug 2006 17:20:32 -0000 Received: (qmail 49789 invoked by uid 500); 3 Aug 2006 17:20:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 49759 invoked by uid 500); 3 Aug 2006 17:20:31 -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 49750 invoked by uid 99); 3 Aug 2006 17:20:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 10:20:31 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of yipng168@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 10:20:30 -0700 Received: by nf-out-0910.google.com with SMTP id m19so183119nfc for ; Thu, 03 Aug 2006 10:20:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=W3+NfVEMhDmpH/qhHQQMBawWc9dL8rIOY57SSTKGweEaTY/2U+HoBEs0PmuKG+lVaoMZaA8m26aBxyN7pgRZ/Y5NZ+LR60JVoAAoIDAJOrKfmFSD5gK5j6JH5xsXluEl0a5NAHr+YbjzNNhUoTzAl0vRLEEzAa70LJOqV8OaYmw= Received: by 10.78.157.8 with SMTP id f8mr850357hue; Thu, 03 Aug 2006 10:20:09 -0700 (PDT) Received: by 10.78.139.9 with HTTP; Thu, 3 Aug 2006 10:20:08 -0700 (PDT) Message-ID: Date: Thu, 3 Aug 2006 10:20:08 -0700 From: "Yip Ng" To: "V.Narayanan (JIRA)" Subject: Re: [jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement. In-Reply-To: <10341497.1154621174856.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19456_33513511.1154625608797" References: <10341497.1154621174856.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_19456_33513511.1154625608797 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks. I have a similar patch and I ran derbyall last night but this morning when I check the result, the OS crashed. So I'll have to run it again... On 8/3/06, V.Narayanan (JIRA) wrote: > > [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ] > > V.Narayanan updated DERBY-1554: > ------------------------------- > > Attachment: DERBY-1554.diff > DERBY-1554.stat > > Hi, > > If we could avoid calling the setIdentity() function in the > GenericLanguageContext class when we have an multi-row insert the above bug > would be fixed. I tried the same in the above patch with a single line fix > and it seemed to work. > > I was going throught the earlier patch I submitted for 353 when I thought > this small fix might resolve this issue. Pls do tell me if you see any > problems with the above fix or if u see any case I might have missed. > > Attaching relevant diff and stat files. I tested this patch only using the > test case with this issue. I also tested test cases for 353 and 439. > > PLEASE NOTE THAT I HAVE NOT RUN DERBYALL on this patch. > > thanx > Narayanan > > > IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a > multi-row INSERT statement. > > > -------------------------------------------------------------------------------------------- > > > > Key: DERBY-1554 > > URL: http://issues.apache.org/jira/browse/DERBY-1554 > > Project: Derby > > Issue Type: Bug > > Components: SQL > > Affects Versions: 10.2.0.0 > > Reporter: Daniel John Debrunner > > Assigned To: Yip Ng > > Fix For: 10.2.0.0 > > > > Attachments: DERBY-1554.diff, DERBY-1554.stat > > > > > > Changes made in DERBY-353 break the documented behaviour of > IDENTITY_VAL_LOCAL(). Now the returned value is modified when a multi-row > insert is performed. > > IDENTITY_VAL_LOCAL() should not be updated when this occurs. > > For this script the last value returned should be 2 (as in 10.1) but in > 10.2 is 4 > > create table ta (a int, b int generated always as identity); > > insert into ta(a) values 100; > > values IDENTITY_VAL_LOCAL(); > > insert into ta(a) values 200; > > values IDENTITY_VAL_LOCAL(); > > insert into ta(a) values 300,400; > > values IDENTITY_VAL_LOCAL(); > > -- > 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 > > > ------=_Part_19456_33513511.1154625608797 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks.  I have a similar patch and I ran derbyall last night but this morning when I check the result, the OS crashed.  So I'll have to run it again...

On 8/3/06, V.Narayanan (JIRA) <derby-dev@db.apache.org> wrote:
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

V.Narayanan updated DERBY-1554:
-------------------------------

    Attachment: DERBY-1554.diff
                DERBY-1554.stat

Hi,

If we could avoid calling the setIdentity() function in the GenericLanguageContext class when we have an multi-row insert the above bug would be fixed. I tried the same in the above patch with a single line fix and it seemed to work.

I was going throught the earlier patch I submitted for 353 when I thought this small fix might resolve this issue. Pls do tell me if you see any problems with the above fix or if u see any case I might have missed.

Attaching relevant diff and stat files. I tested this patch only using the test case with this issue. I also tested test cases for 353 and 439.

PLEASE NOTE THAT I HAVE NOT RUN DERBYALL on this patch.

thanx
Narayanan

> IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1554
>                 URL: http://issues.apache.org/jira/browse/DERBY-1554
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Yip Ng
>             Fix For: 10.2.0.0
>
>         Attachments: DERBY-1554.diff, DERBY-1554.stat
>
>
> Changes made in DERBY-353 break the documented behaviour of IDENTITY_VAL_LOCAL(). Now the returned value is modified when a multi-row insert is performed.
> IDENTITY_VAL_LOCAL() should not be updated when this occurs.
> For this script the last value returned should be 2 (as in 10.1) but in 10.2 is 4
> create table ta (a int, b int generated always as identity);
> insert into ta(a) values 100;
> values IDENTITY_VAL_LOCAL();
> insert into ta(a) values 200;
> values IDENTITY_VAL_LOCAL();
> insert into ta(a) values 300,400;
> values IDENTITY_VAL_LOCAL();

--
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



------=_Part_19456_33513511.1154625608797--