OLD | NEW |
1 # 2006 February 10 | 1 # 2006 February 10 |
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 16 matching lines...) Expand all Loading... |
27 db close | 27 db close |
28 file delete -force test.db test.db-journal | 28 file delete -force test.db test.db-journal |
29 | 29 |
30 # Set the pending byte offset such that the page it is on is | 30 # Set the pending byte offset such that the page it is on is |
31 # the first autovacuum pointer map page in the file (assume a page | 31 # the first autovacuum pointer map page in the file (assume a page |
32 # size of 1024). | 32 # size of 1024). |
33 | 33 |
34 set first_ptrmap_page [expr 1024/5 + 3] | 34 set first_ptrmap_page [expr 1024/5 + 3] |
35 sqlite3_test_control_pending_byte [expr 1024 * ($first_ptrmap_page-1)] | 35 sqlite3_test_control_pending_byte [expr 1024 * ($first_ptrmap_page-1)] |
36 | 36 |
37 sqlite db test.db | 37 sqlite3 db test.db |
38 | 38 |
39 do_test tkt1667-1 { | 39 do_test tkt1667-1 { |
40 execsql { | 40 execsql { |
41 PRAGMA auto_vacuum = 1; | 41 PRAGMA auto_vacuum = 1; |
42 BEGIN; | 42 BEGIN; |
43 CREATE TABLE t1(a, b); | 43 CREATE TABLE t1(a, b); |
44 } | 44 } |
45 for {set i 0} {$i < 500} {incr i} { | 45 for {set i 0} {$i < 500} {incr i} { |
46 execsql { | 46 execsql { |
47 INSERT INTO t1 VALUES($i, randstr(1000, 2000)) | 47 INSERT INTO t1 VALUES($i, randstr(1000, 2000)) |
(...skipping 26 matching lines...) Expand all Loading... |
74 } | 74 } |
75 } {} | 75 } {} |
76 do_test tkt1667-4.1 { | 76 do_test tkt1667-4.1 { |
77 execsql { | 77 execsql { |
78 DELETE FROM t1; | 78 DELETE FROM t1; |
79 } | 79 } |
80 } {} | 80 } {} |
81 integrity_check tkt1667-4.2 | 81 integrity_check tkt1667-4.2 |
82 | 82 |
83 finish_test | 83 finish_test |
OLD | NEW |