Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Limbo does not enforce primary key uniqueness on PKs that are not rowid aliases #472

Open
jussisaurio opened this issue Dec 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jussisaurio
Copy link
Collaborator

jussisaurio commented Dec 14, 2024

sqlite> create table foo (pk TEXT PRIMARY KEY);
sqlite> insert into foo values ('lol');
sqlite> insert into foo values ('lol');
Runtime error: UNIQUE constraint failed: foo.pk (19)

sqlite> create table foo_int (pk INT PRIMARY KEY);
sqlite> insert into foo_int values (1);
sqlite> insert into foo_int values (1);
Runtime error: UNIQUE constraint failed: foo_int.pk (19)
limbo> create table foo (pk TEXT PRIMARY KEY);
limbo> insert into foo values ('lol');
limbo> insert into foo values ('lol');

limbo> create table foo_int (pk INT PRIMARY KEY);
limbo> insert into foo_int values (1);
limbo> insert into foo_int values (1);

limbo> create table foo_rowid_alias (pk INTEGER PRIMARY KEY);
limbo> insert into foo_rowid_alias values (1);
limbo> insert into foo_rowid_alias values (1);
Runtime error: UNIQUE constraint failed: foo_rowid_alias.pk (19)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant