mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-15 23:48:49 +00:00
ad79ef48a2
* add tests * add bench
31 lines
902 B
Plaintext
31 lines
902 B
Plaintext
|
|
CREATE TABLE t8(a TEXT, b INT);
|
|
SELECT (SELECT 0 FROM (SELECT * FROM t1)) AS x WHERE x;
|
|
SELECT (SELECT 0 FROM (SELECT * FROM (SELECT 0))) AS x WHERE x;
|
|
|
|
|
|
CREATE TABLE t1(x);
|
|
INSERT INTO t1 VALUES(1),(1),(1);
|
|
SELECT (SELECT DISTINCT x FROM t1 ORDER BY +x LIMIT 1 OFFSET 100) FROM t1;
|
|
|
|
|
|
SELECT (SELECT DISTINCT x FROM t1 ORDER BY +x LIMIT 1 OFFSET 0) FROM t1;
|
|
|
|
|
|
INSERT INTO t1 VALUES(2);
|
|
SELECT (SELECT DISTINCT x FROM t1 ORDER BY +x LIMIT 1 OFFSET 1) FROM t1;
|
|
|
|
|
|
SELECT (SELECT DISTINCT x FROM t1 ORDER BY +x LIMIT 1 OFFSET 2) FROM t1;
|
|
|
|
|
|
CREATE TABLE t1(aa TEXT, bb INT, cc TEXT);
|
|
CREATE INDEX x11 on t1(bb);
|
|
CREATE INDEX x12 on t1(aa);
|
|
CREATE TABLE t2(aa TEXT, xx INT);
|
|
ANALYZE sqlite_master;
|
|
INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES('t1', 'x11', '156789 28');
|
|
INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES('t1', 'x12', '156789 1');
|
|
ANALYZE sqlite_master;
|
|
|