mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-12 15:33:44 +00:00
ad79ef48a2
* add tests * add bench
50 lines
826 B
Plaintext
50 lines
826 B
Plaintext
|
|
CREATE TABLE t1(a, b);
|
|
INSERT INTO t1 VALUES(1, 2);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(3, 4);
|
|
|
|
|
|
COMMIT;
|
|
CREATE TABLE t2(a, b);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(5, 6);
|
|
INSERT INTO t2 VALUES('a', 'b');
|
|
|
|
|
|
COMMIT;
|
|
CREATE TABLE t3(a, b);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(7, 8);
|
|
INSERT INTO t2 VALUES('c', 'd');
|
|
INSERT INTO t3 VALUES('i', 'ii');
|
|
|
|
|
|
COMMIT;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(9, 10);
|
|
|
|
COMMIT
|
|
|
|
ATTACH 'test.db2' AS aux;
|
|
CREATE TABLE aux.t4(x, y);
|
|
INSERT INTO t4 VALUES('A', 'B');
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(11, 12);
|
|
INSERT INTO t4 VALUES('C', 'D');
|
|
|
|
COMMIT
|
|
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(13, 14);
|
|
INSERT INTO t4 VALUES('E', 'F');
|
|
|
|
COMMIT
|
|
PRAGMA integrity_check
|
|
COMMIT
|
|
PRAGMA integrity_check
|
|
|
|
SELECT count(*) FROM t1;
|
|
SELECT count(*) FROM t2;
|
|
|