3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
13 # Specifically, the tests in this file attempt to verify that
14 # multi-threaded sorting works.
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
26 catch { db eval {PRAGMA threads=7} }
32 do_execsql_test $tn.1 {
33 PRAGMA cache_size = 5;
35 SELECT 1, randomblob(100)
37 SELECT x+1, randomblob(100) FROM r
40 SELECT count(x), length(y) FROM r GROUP BY (x%5)
42 20000 100 20000 100 20000 100 20000 100 20000 100
45 do_execsql_test $tn.2.1 {
46 CREATE TABLE t1(a, b);
48 SELECT 1, randomblob(100)
50 SELECT x+1, randomblob(100) FROM r
52 ) INSERT INTO t1 SELECT * FROM r;
55 do_execsql_test $tn.2.2 {
56 CREATE UNIQUE INDEX i1 ON t1(b, a);
59 do_execsql_test $tn.2.3 {
60 CREATE UNIQUE INDEX i2 ON t1(a);
63 do_execsql_test $tn.2.4 { PRAGMA integrity_check } {ok}
66 do_execsql_test $tn.3 {
67 PRAGMA cache_size = 5;
69 SELECT 1, randomblob(100)
71 SELECT x+1, randomblob(100) FROM r
74 SELECT count(x), length(y) FROM r GROUP BY (x%5)
76 200000 100 200000 100 200000 100 200000 100 200000 100