IDENTITY column with explicit START WITH or INCREMENT BY starts with wrong value
--------------------------------------------------------------------------------

                 Key: CORE-6376
                 URL: http://tracker.firebirdsql.org/browse/CORE-6376
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 4.0 Beta 2
         Environment: Firebird-4.0.0.2126-0_x64 on Windows 10
            Reporter: Mark Rotteveel


When using an identity column with an explicit START WITH clause, it starts 
with the wrong value:

SQL> create database 'localhost:e:/db/fb4/identity_test.fdb' user sysdba 
password 'masterkey';
SQL> create table identity_test (id bigint generated always as identity (start 
with 1 increment by 10));
SQL> insert into identity_test default values;
SQL> select * from identity_test;

                   ID
=====================
                   11

expected result is 1.

SQL> create table identity_test2 (id bigint generated always as identity (start 
with 1));
SQL> insert into identity_test2 default values;
SQL> select * from identity_test2;

                   ID
=====================
                    2

expected result is 1

This is also the case for only INCREMENT BY:

SQL> create table identity_test3 (id bigint generated always as identity 
(increment by 10));
SQL> insert into identity_test3 default values;
SQL> select * from identity_test3;

                   ID
=====================
                   10

Expected result is 1

This is related to CORE-6084.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to