1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add the "wholenumber" virtual table module to the test suite - useful in

populating tables with many rows of content prior to a test.

FossilOrigin-Name: 975dff155bd9db42f2b6855b24c861852bb7a201
This commit is contained in:
drh
2011-04-01 23:49:44 +00:00
parent 8689bc308f
commit 70586beb3d
8 changed files with 334 additions and 32 deletions

View File

@ -365,17 +365,11 @@ do_test memdb-6.15 {
ifcapable subquery {
do_test memdb-7.1 {
register_wholenumber_module db
execsql {
CREATE TABLE t6(x);
INSERT INTO t6 VALUES(1);
INSERT INTO t6 SELECT x+1 FROM t6;
INSERT INTO t6 SELECT x+2 FROM t6;
INSERT INTO t6 SELECT x+4 FROM t6;
INSERT INTO t6 SELECT x+8 FROM t6;
INSERT INTO t6 SELECT x+16 FROM t6;
INSERT INTO t6 SELECT x+32 FROM t6;
INSERT INTO t6 SELECT x+64 FROM t6;
INSERT INTO t6 SELECT x+128 FROM t6;
CREATE VIRTUAL TABLE nums USING wholenumber;
INSERT INTO t6 SELECT value FROM nums WHERE value BETWEEN 1 AND 256;
SELECT count(*) FROM (SELECT DISTINCT x FROM t6);
}
} {256}