0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 08:39:46 +00:00
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

* add bench
2024-05-24 13:59:17 +00:00

32 lines
633 B
Plaintext

CREATE TABLE t8(
rid INTEGER,
pid INTEGER,
mid INTEGER,
px INTEGER DEFAULT(0) CHECK(px IN(0, 1))
);
CREATE TEMP TABLE x(
rid INTEGER,
pid INTEGER,
mid INTEGER,
px INTEGER DEFAULT(0) CHECK(px IN(0, 1))
);
CREATE TABLE t9(a, b, c);
CREATE INDEX t9a ON t9(a);
CREATE INDEX t9b ON t9(b) WHERE c=0;
INSERT INTO t9 VALUES(1, 1, 1);
INSERT INTO t9 VALUES(2, 2, 2);
INSERT INTO t9 VALUES(3, 3, 3);
CREATE TABLE t10(a, b, c);
CREATE INDEX t10a ON t10(a);
CREATE INDEX t10b ON t10(b) WHERE c=0;
INSERT INTO t10 SELECT * FROM t9;
SELECT * FROM t10;
PRAGMA integrity_check;