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

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

35 lines
572 B
Plaintext

PRAGMA auto_vacuum=OFF;
PRAGMA journal_mode=DELETE;
CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d);
INSERT INTO t1 VALUES('x', 'y');
INSERT INTO t2 VALUES('i', 'j');
PRAGMA cache_size = 1;
BEGIN;
INSERT INTO t1 VALUES(1, 2);
PRAGMA lock_status;
INSERT INTO t2 VALUES(1, 2);
PRAGMA lock_status;
SELECT * FROM t1 UNION SELECT * FROM t2;
PRAGMA cache_size = 0;
BEGIN;
INSERT INTO t1 VALUES(1, 2);
PRAGMA lock_status;
INSERT INTO t2 VALUES(1, 2);
PRAGMA lock_status;
SELECT * FROM t1 UNION SELECT * FROM t2;