OLD | NEW |
1 # 2014 March 25. | 1 # 2014 March 25. |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 13 matching lines...) Expand all Loading... |
24 sqlite3 db test.db | 24 sqlite3 db test.db |
25 | 25 |
26 foreach {tn script} { | 26 foreach {tn script} { |
27 1 { } | 27 1 { } |
28 2 { | 28 2 { |
29 catch { db close } | 29 catch { db close } |
30 reset_db | 30 reset_db |
31 catch { db eval {PRAGMA threads=7} } | 31 catch { db eval {PRAGMA threads=7} } |
32 } | 32 } |
33 } { | 33 } { |
34 | |
35 eval $script | 34 eval $script |
36 | 35 |
37 do_execsql_test $tn.1 { | 36 do_execsql_test $tn.1 { |
38 PRAGMA cache_size = 5; | 37 PRAGMA cache_size = 5; |
39 WITH r(x,y) AS ( | 38 WITH r(x,y) AS ( |
40 SELECT 1, randomblob(100) | 39 SELECT 1, randomblob(100) |
41 UNION ALL | 40 UNION ALL |
42 SELECT x+1, randomblob(100) FROM r | 41 SELECT x+1, randomblob(100) FROM r |
43 LIMIT 100000 | 42 LIMIT 100000 |
44 ) | 43 ) |
(...skipping 15 matching lines...) Expand all Loading... |
60 do_execsql_test $tn.2.2 { | 59 do_execsql_test $tn.2.2 { |
61 CREATE UNIQUE INDEX i1 ON t1(b, a); | 60 CREATE UNIQUE INDEX i1 ON t1(b, a); |
62 } | 61 } |
63 | 62 |
64 do_execsql_test $tn.2.3 { | 63 do_execsql_test $tn.2.3 { |
65 CREATE UNIQUE INDEX i2 ON t1(a); | 64 CREATE UNIQUE INDEX i2 ON t1(a); |
66 } | 65 } |
67 | 66 |
68 do_execsql_test $tn.2.4 { PRAGMA integrity_check } {ok} | 67 do_execsql_test $tn.2.4 { PRAGMA integrity_check } {ok} |
69 | 68 |
70 do_execsql_test $tn.3 { | 69 # Because it uses so much data, this test can take 12-13 seconds even on |
71 PRAGMA cache_size = 5; | 70 # a modern workstation. So it is omitted from "veryquick" and other |
72 WITH r(x,y) AS ( | 71 # permutations.test tests. |
73 SELECT 1, randomblob(100) | 72 if {[isquick]==0} { |
74 UNION ALL | 73 do_execsql_test $tn.3 { |
75 SELECT x+1, randomblob(100) FROM r | 74 PRAGMA cache_size = 5; |
76 LIMIT 1000000 | 75 WITH r(x,y) AS ( |
77 ) | 76 SELECT 1, randomblob(100) |
78 SELECT count(x), length(y) FROM r GROUP BY (x%5) | 77 UNION ALL |
79 } { | 78 SELECT x+1, randomblob(100) FROM r |
80 200000 100 200000 100 200000 100 200000 100 200000 100 | 79 LIMIT 1000000 |
| 80 ) |
| 81 SELECT count(x), length(y) FROM r GROUP BY (x%5) |
| 82 } { |
| 83 200000 100 200000 100 200000 100 200000 100 200000 100 |
| 84 } |
81 } | 85 } |
82 } | 86 } |
83 | 87 |
84 finish_test | 88 finish_test |
OLD | NEW |