OLD | NEW |
1 # 2007 April 12 | 1 # 2007 April 12 |
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 #*********************************************************************** |
11 # This file implements regression tests for SQLite library. | 11 # This file implements regression tests for SQLite library. |
12 # The focus of the tests in this file are to verify that the | 12 # The focus of the tests in this file are to verify that the |
13 # pager optimizations implemented in version 3.3.14 work. | 13 # pager optimizations implemented in version 3.3.14 work. |
14 # | 14 # |
15 # $Id: pageropt.test,v 1.5 2008/08/20 14:49:25 danielk1977 Exp $ | 15 # $Id: pageropt.test,v 1.5 2008/08/20 14:49:25 danielk1977 Exp $ |
16 | 16 |
17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] |
18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl |
| 19 do_not_use_codec |
19 | 20 |
20 ifcapable {!pager_pragmas||secure_delete||direct_read} { | 21 ifcapable {!pager_pragmas||secure_delete||direct_read} { |
21 finish_test | 22 finish_test |
22 return | 23 return |
23 } | 24 } |
24 | 25 |
| 26 # A non-zero reserved_bytes value changes the number of pages in the |
| 27 # database file, which messes up the results in this test. |
| 28 if {[nonzero_reserved_bytes]} {finish_test; return;} |
| 29 |
25 # Run the SQL statement supplied by the argument and return | 30 # Run the SQL statement supplied by the argument and return |
26 # the results. Prepend four integers to the beginning of the | 31 # the results. Prepend four integers to the beginning of the |
27 # result which are | 32 # result which are |
28 # | 33 # |
29 # (1) The number of page reads from the database | 34 # (1) The number of page reads from the database |
30 # (2) The number of page writes to the database | 35 # (2) The number of page writes to the database |
31 # (3) The number of page writes to the journal | 36 # (3) The number of page writes to the journal |
32 # (4) The number of cache pages freed | 37 # (4) The number of cache pages freed |
33 # | 38 # |
34 proc pagercount_sql {sql {db db}} { | 39 proc pagercount_sql {sql {db db}} { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 db close | 200 db close |
196 sqlite3 db test.db | 201 sqlite3 db test.db |
197 pagercount_sql { | 202 pagercount_sql { |
198 DELETE FROM t1 | 203 DELETE FROM t1 |
199 } | 204 } |
200 } {12 3 3} | 205 } {12 3 3} |
201 | 206 |
202 sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit) | 207 sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit) |
203 catch {db2 close} | 208 catch {db2 close} |
204 finish_test | 209 finish_test |
OLD | NEW |