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

41 lines
815 B
Plaintext

CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d NOT NULL);
WITH x(i) AS (
SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<1000
)
INSERT INTO t1 SELECT i, i FROM x;
INSERT INTO t2 SELECT * FROM t1;
CREATE TABLE T1(a INTEGER PRIMARY KEY, b);
CREATE TABLE T3(k, v);
SELECT * FROM (SELECT a, b FROM t1) LEFT JOIN t3 ON a IS NULL;
CREATE TABLE t0(c0 PRIMARY KEY);
INSERT INTO t0(c0) VALUES (0);
SELECT * FROM t0 WHERE ((c0 NOT NULL) AND 1) OR (c0 == NULL);
SELECT *, '/'
FROM (
SELECT NULL val FROM (SELECT 1)
UNION ALL
SELECT 'missing' FROM (SELECT 1)
) a
LEFT JOIN (SELECT 1)
ON a.val IS NULL;
CREATE TABLE t1(a INT);
INSERT INTO t1(a) VALUES(1);
CREATE TABLE t2(b INT);
SELECT * FROM (SELECT 3 AS c FROM t1) AS t3 LEFT JOIN t2 ON c IS NULL;