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

46 lines
1.2 KiB
Plaintext

CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3),(4,5,6);
SELECT quote(eval('SELECT * FROM t1 ORDER BY a','-abc-'));
SELECT quote(eval('SELECT * FROM t1 ORDER BY a'));
INSERT INTO t1 VALUES(7,null,9);
SELECT eval('SELECT * FROM t1 ORDER BY a',',');
CREATE TABLE t1(a INTEGER PRIMARY KEY, b INTEGER) WITHOUT ROWID;
CREATE TABLE t2(c INTEGER PRIMARY KEY, d INTEGER, x BLOB);
INSERT INTO t1 VALUES(0,0);
INSERT INTO t1 VALUES(10,10);
INSERT INTO t2 VALUES(1,1,zeroblob(200));
INSERT INTO t2 VALUES(2,2,zeroblob(200));
INSERT INTO t2 VALUES(3,3,zeroblob(200));
INSERT INTO t2 VALUES(4,4,zeroblob(200));
INSERT INTO t2 VALUES(5,5,zeroblob(200));
INSERT INTO t2 VALUES(6,6,zeroblob(200));
INSERT INTO t2 VALUES(7,7,zeroblob(200));
INSERT INTO t2 VALUES(8,8,zeroblob(200));
INSERT INTO t2 VALUES(9,9,zeroblob(200));
INSERT INTO t2 VALUES(10,10,zeroblob(200));
SELECT a, c, eval(
printf('DELETE FROM t2 WHERE c=%d AND %d>5', a+c, a+c)
) FROM t1, t2;
CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3);
ATTACH 'test2.db' AS aux2;
CREATE TABLE aux2.t2(c,d,e);
INSERT INTO t2 VALUES(4,5,6);
SELECT * FROM t1, t2;
PRAGMA database_list;
SELECT name FROM icecube.sqlite_master;