You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/07/20 23:00:14 UTC

[jira] Created: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

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


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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12422492 ] 
            
Daniel John Debrunner commented on DERBY-1554:
----------------------------------------------

The comment by Kathey in DERBY-353 alerted me to this regression, thanks Kathey for noticing the strange diff in the test output.

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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12425615 ] 
            
Yip Ng commented on DERBY-1554:
-------------------------------

Hi Narayanan

   I looked at the attached patch.  It is returning the wrong result in the following case:
It should be null.

ij> create table t1 (i int generated by default as identity, j int);
0 rows inserted/updated/deleted
ij> create table t2 (i int);
0 rows inserted/updated/deleted
ij> insert into t1 (i) select i from t2;
0 rows inserted/updated/deleted
ij> values identity_val_local();
1
-------------------------------
0

1 row selected



> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Rick Hillegas updated DERBY-1554:
---------------------------------

    Priority: Major  (was: Critical)

> 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
>             Fix For: 10.2.0.0
>
>
> 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

        

[jira] Closed: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Rick Hillegas closed DERBY-1554.
--------------------------------

    Resolution: Fixed

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12425941 ] 
            
Yip Ng commented on DERBY-1554:
-------------------------------

Running derbyall now, will post the result tomorrow...

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12425618 ] 
            
Yip Ng commented on DERBY-1554:
-------------------------------

Hi Narayanan

   It is failing in this case also, the result should be null.  I think the rowCount comparison cannot be used
to determine whether to set the identity val or not.  It should be based on the source resultset type.

ij> create table t1 (i int generated by default as identity, j int);
0 rows inserted/updated/deleted
ij> create table t2 (i int);
0 rows inserted/updated/deleted
ij> insert into t2 values 10;
1 row inserted/updated/deleted
ij> insert into t1 (i) select i from t2;
1 row inserted/updated/deleted
ij> values identity_val_local();
1
-------------------------------
10

1 row selected

> 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

        

[jira] Resolved: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Kathey Marsden resolved DERBY-1554.
-----------------------------------

    Fix Version/s: 10.1.3.2
       Resolution: Fixed

Fixed in 10.1.3.2

Date: Thu Aug 10 06:43:20 2006
New Revision: 430381

URL: http://svn.apache.org/viewvc?rev=430381&view=rev
Log:
DERBY-353 It is desirable to have IDENTITY_VAL_LOCAL() function return last recent user specified value or system generated value for BY DEFAULT identity columns.

Merged from trunk 267331, contributed by V.Narayanan

DERBY-1554 IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Merged from trunk 429425, contributed by Yip Ng






> 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.1.3.2, 10.2.0.0
>
>         Attachments: DERBY-1554.diff, DERBY-1554.stat, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Yip Ng updated DERBY-1554:
--------------------------

    Attachment: derby1554trunkstat01.txt
                derby1554trunkdiff01.txt

Attaching my initial patch - derby1554trunkdiff01.txt for DERBY-1554.  This patch only contains the fix.  I ran derbyall and there are some diffs but they are expected.  Will go through the diffs to see if patch is ok and submit a followup patch for fixing the master output with additional testcases.

The patch is now checking for RowResultSet type for user supplied value for identity column.  If the source result set is not of that type, Derby won't update the identityVal.   

> 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, derby1554trunkdiff01.txt, derby1554trunkstat01.txt
>
>
> 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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12425982 ] 
            
Yip Ng commented on DERBY-1554:
-------------------------------

derbyall passes except for the following tests which are known issues.

derbyall/derbynetclientmats/derbynetclientmats.fail:jdbcapi/XATest.java (DERBY-1640)
derbyall/derbynetclientmats/derbynetmats.fail:lang/wisconsin.java  (DERBY-1649)


> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Reopened: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Kathey Marsden reopened DERBY-1554:
-----------------------------------

             

> 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, 10.1.3.2
>
>         Attachments: DERBY-1554.diff, DERBY-1554.stat, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Assigned: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Yip Ng reassigned DERBY-1554:
-----------------------------

    Assignee: Yip Ng

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

        

[jira] Closed: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Kathey Marsden closed DERBY-1554.
---------------------------------


> 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, 10.1.3.2
>
>         Attachments: DERBY-1554.diff, DERBY-1554.stat, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Yip Ng updated DERBY-1554:
--------------------------

    Derby Info: [Patch Available, Existing Application Impact, Regression]  (was: [Existing Application Impact, Regression])

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "V.Narayanan (JIRA)" <de...@db.apache.org>.
     [ 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Yip Ng updated DERBY-1554:
--------------------------

    Attachment: derby1554trunkstat02.txt
                derby1554trunkdiff02.txt

Submitting follow up patch for DERBY-1554.  This patch contains the fix + the correct master outputs.  There were quite a number of diffs in the master files, so I had to go throught the regression results to make sure they are correct.  I also ran the autoincrement script against DB2 to double check the results.  Appreciate if someone can review this.  The patch is in derby1554trunkdiff02.txt.  

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Kathey Marsden updated DERBY-1554:
----------------------------------

    Derby Info: [Regression]  (was: [Existing Application Impact, Regression])

Now that this is fixed and we have returned to the previous behavior, there should no longer be Existing Application Impact, so unchecking that..  The Existing application checkbox should reflect the current state as  it affects users.  The idea is that users can generate a report of issues which have existing application impact and see what changes might affect their application.


> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12426239 ] 
            
Rick Hillegas commented on DERBY-1554:
--------------------------------------

Thanks, Yip. The edits look good to me. As a sanity check, I'm running derbyall on my linux machine. Will commit if the tests run fine.

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Commented: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1554?page=comments#action_12426282 ] 
            
Rick Hillegas commented on DERBY-1554:
--------------------------------------

Committed derby1554trunkdiff02.txt at subversion revision 429425. As Yip says, derbyall only shows the expected diffs in XATest and wisconsin.

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Rick Hillegas updated DERBY-1554:
---------------------------------

    Derby Info: [Existing Application Impact, Regression]  (was: [Existing Application Impact, Patch Available, Regression])

> 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, derby1554trunkdiff01.txt, derby1554trunkdiff02.txt, derby1554trunkstat01.txt, derby1554trunkstat02.txt
>
>
> 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

        

[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Rick Hillegas updated DERBY-1554:
---------------------------------

    Urgency: Urgent

Bumping urgency.

> 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
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>
> 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

        

Fixing Jira settings - Volunteer Needed (was Re: [jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.)

Posted by Kathey Marsden <km...@sbcglobal.net>.
Rick Hillegas wrote:

>  we will revisit all of the Blocker/Critical bugs which we've marked 
> for 10.2. 

Yes, priorities (mental translation SEVERITIES)  are quite out of whack, 
not only because of the misnamed field, but because "Major" is the default.

After we get Urgency in and all the fields documented  based on recent 
discussions. In addition to our distributed maintenance process, we 
really need a full pass of  Jira Issue's open and closed.  We should 
correct Jira settings for  regression, existing application impact, 
Priority, affects and Fix version (for closed issues), and release note 
needed.   These should all be fairly objective fields.

If  you are a  newcomer,   student or other who wants to make a high 
value contribution and  learn a lot about Derby in the process and start 
working with me on this important project, I would be most grateful. 
Best qualified candidates would be someone with

 - An intense focus on the user perspective or desire to have it.
 - A high level of respect and appreciation for the developers who add 
all the wonderful new functionality and fix the bugs.
 - Enough of the two items listed above to get excited when you find a 
hidden issue because  flushing out and identifying issues *before* users 
hit them  is what everyone wants. 
- Some JDBC API /Database externals  (usage)  knowledge  but not 
absolutely required.

Please let me know if you are interested.

Kathey



Re: [jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by Rick Hillegas <Ri...@Sun.COM>.
After Andrew wrestles the Urgency field onto our JIRAs, we will revisit 
all of the Blocker/Critical bugs which we've marked for 10.2. Currently, 
there are 7 of these bugs. Of those 7, only 2 are really 
Blocker/Critical severity according to the JIRA definitions below 
(DERBY-1564 and DERBY-700). I think that the remaining 5 bugs on that 
list should be marked Urgent and their severity should be downgraded. 
This will get sorted out after Andrew's hard work.

Regards,
-Rick

Kathey Marsden wrote:

> Rick Hillegas (JIRA) wrote:
>
>>
>> Assigning this bug to 10.2 and bumping its priority to Critical. This 
>> will make it visible to bug-fixers. Once the Urgency field appears, 
>> we can adjust the severity of this bug.
>>
>>  
>>
> I think it is really important not to muck with the priority (mental 
> translation SEVERITY) settings even with the intention of setting  
> them back later on.   A good way to cope until we have  Urgency   is  
> to look first at the open product regression list first:
> http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&&pid=10594&component=11670&component=11406&component=12310670&component=12310194&component=11407&component=11409&component=11690&component=11410&component=11411&component=11415&component=11408&component=11412&component=11414&status=1&status=3&status=4&customfield_12310090=Regression&sorter/field=issuekey&sorter/order=DESC 
>
>
> and then at the   Blocker/Critical issues.
>
> But I really feel stronger each day that Priority needs to stay as 
> outlined in Jira and below:
>
> Blocker
>    Blocks development and/or testing work, production could not run
> Critical
>    Crashes, loss of data, severe memory leak.
> Major
>    Major loss of function.
> Minor
>    Minor loss of function, or other problem where easy workaround is 
> present.
> Trivial
>    Cosmetic problem like misspelt words or misaligned text.
>
> Andrew said that he would have this by the end of the week so we are 
> talking about a day's wait.    We should not corrupt our bug database 
> with wrong data or our thinking with wrong mappings by setting it 
> incorrectly.  I have made this mistake myself in not marking DERBY-700 
> Critical because it is hard to fix.  That was very wrong thinking on 
> my part.  I fear has caused users to lose their data.  DERBY-700 is 
> Priority *Critical*.  It's Urgency might be something else based on 
> how hard it is to fix.
>
> Kathey
>
>
>
>


Re: [jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by Kathey Marsden <km...@sbcglobal.net>.
Rick Hillegas (JIRA) wrote:

>
>Assigning this bug to 10.2 and bumping its priority to Critical. This will make it visible to bug-fixers. Once the Urgency field appears, we can adjust the severity of this bug.
>
>  
>
I think it is really important not to muck with the priority (mental 
translation SEVERITY) settings even with the intention of setting  them 
back later on.   A good way to cope until we have  Urgency   is  to look 
first at the open product regression list first:
http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&&pid=10594&component=11670&component=11406&component=12310670&component=12310194&component=11407&component=11409&component=11690&component=11410&component=11411&component=11415&component=11408&component=11412&component=11414&status=1&status=3&status=4&customfield_12310090=Regression&sorter/field=issuekey&sorter/order=DESC

and then at the   Blocker/Critical issues.
 
But I really feel stronger each day that Priority needs to stay as 
outlined in Jira and below:

 Blocker
    Blocks development and/or testing work, production could not run
Critical
    Crashes, loss of data, severe memory leak.
Major
    Major loss of function.
Minor
    Minor loss of function, or other problem where easy workaround is 
present.
Trivial
    Cosmetic problem like misspelt words or misaligned text.

Andrew said that he would have this by the end of the week so we are 
talking about a day's wait.    We should not corrupt our bug database 
with wrong data or our thinking with wrong mappings by setting it 
incorrectly.  I have made this mistake myself in not marking DERBY-700 
Critical because it is hard to fix.  That was very wrong thinking on my 
part.  I fear has caused users to lose their data.  DERBY-700 is 
Priority *Critical*.  It's Urgency might be something else based on how 
hard it is to fix.

Kathey





[jira] Updated: (DERBY-1554) IDENTITY_VAL_LOCAL() returned value is modified incorrectly by a multi-row INSERT statement.

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1554?page=all ]

Rick Hillegas updated DERBY-1554:
---------------------------------

    Fix Version/s: 10.2.0.0
         Priority: Critical  (was: Major)

Assigning this bug to 10.2 and bumping its priority to Critical. This will make it visible to bug-fixers. Once the Urgency field appears, we can adjust the severity of this bug.

> 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
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>
> 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