mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
add test
This commit is contained in:
@@ -174,4 +174,17 @@ do_execsql_test_on_specific_db {:memory:} autoinc-conflict-on-nothing {
|
||||
INSERT INTO t (k) VALUES ('a') ON CONFLICT DO NOTHING;
|
||||
INSERT INTO t (k) VALUES ('b');
|
||||
SELECT * FROM t ORDER BY id;
|
||||
} {1|a 2|a 4|b}
|
||||
} {1|a 2|a 4|b}
|
||||
|
||||
# https://github.com/tursodatabase/turso/issues/3664
|
||||
do_execsql_test_on_specific_db {:memory:} autoinc-skips-manually-updated-pk {
|
||||
CREATE TABLE t(a INTEGER PRIMARY KEY AUTOINCREMENT);
|
||||
INSERT INTO t DEFAULT VALUES;
|
||||
select * from sqlite_sequence;
|
||||
UPDATE t SET a = a + 1;
|
||||
SELECT * FROM sqlite_sequence;
|
||||
INSERT INTO t DEFAULT VALUES;
|
||||
SELECT * FROM sqlite_sequence;
|
||||
} {t|1
|
||||
t|1
|
||||
t|3}
|
||||
|
||||
Reference in New Issue
Block a user