Skip to content

sqlite_sequence table is un-initialized on first insert with negative value #5703

Description

@PThorpe92

Reproduce:

CREATE TABLE t(id INTEGER PRIMARY KEY AUTOINCREMENT, payload TEXT);
INSERT OR IGNORE INTO t(id,payload) VALUES (-42, 'tx_explicit_0');
SELECT name, seq FROM sqlite_sequence WHERE name='t';

SQLite returns t|0
tursodb returns

We don't initialize the sequence table unless a non-zero, or implicit (no provided rowid/PK) insert happens

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions