0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 22:39:05 +00:00
libsql/libsql-wal/tests/assets/fixtures/tkt-80ba201079.test
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

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

40 lines
829 B
Plaintext

CREATE TABLE t1(a, b, c);
CREATE INDEX i1 ON t1(a);
CREATE INDEX i2 ON t1(b);
CREATE TABLE t2(d, e);
INSERT INTO t1 VALUES('A', 'B', 'C');
INSERT INTO t2 VALUES('D', 'E');
SELECT * FROM t1, t2 WHERE
(a='A' AND d='E') OR
(b='B' AND c IN ('C', 'D', 'E'))
SELECT * FROM t1, t2 WHERE
(a='A' AND d='E') OR
(b='B' AND c IN (SELECT c FROM t1))
SELECT * FROM t1, t2 WHERE
(a='A' AND d='E') OR
(b='B' AND c IN (SELECT 'B' UNION SELECT 'C' UNION SELECT 'D'))
SELECT * FROM t1, t2 WHERE
(b='B' AND c IN ('C', 'D', 'E')) OR
(a='A' AND d='E')
SELECT * FROM t1, t2 WHERE
(b='B' AND c IN (SELECT c FROM t1)) OR
(a='A' AND d='E')
SELECT * FROM t1, t2 WHERE
(b='B' AND c IN (SELECT 'B' UNION SELECT 'C' UNION SELECT 'D')) OR
(a='A' AND d='E')