| OLD | NEW |
| 1 # 2001 September 15 | 1 # 2001 September 15 |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 CREATE INDEX i1 ON t1(b,c); | 47 CREATE INDEX i1 ON t1(b,c); |
| 48 CREATE UNIQUE INDEX i2 ON t1(c,a); | 48 CREATE UNIQUE INDEX i2 ON t1(c,a); |
| 49 CREATE TABLE t2 AS SELECT * FROM t1; | 49 CREATE TABLE t2 AS SELECT * FROM t1; |
| 50 COMMIT; | 50 COMMIT; |
| 51 DROP TABLE t2; | 51 DROP TABLE t2; |
| 52 } | 52 } |
| 53 set ::size1 [file size test.db] | 53 set ::size1 [file size test.db] |
| 54 set ::cksum [cksum] | 54 set ::cksum [cksum] |
| 55 expr {$::cksum!=""} | 55 expr {$::cksum!=""} |
| 56 } {1} | 56 } {1} |
| 57 |
| 58 # Create bogus application-defined functions for functions used |
| 59 # internally by VACUUM, to ensure that VACUUM falls back |
| 60 # to the built-in functions. |
| 61 # |
| 62 proc failing_app_func {args} {error "bad function"} |
| 63 do_test vacuum-1.1b { |
| 64 db func substr failing_app_func |
| 65 db func like failing_app_func |
| 66 db func quote failing_app_func |
| 67 catchsql {SELECT substr(name,1,3) FROM sqlite_master} |
| 68 } {1 {bad function}} |
| 69 |
| 57 do_test vacuum-1.2 { | 70 do_test vacuum-1.2 { |
| 58 execsql { | 71 execsql { |
| 59 VACUUM; | 72 VACUUM; |
| 60 } | 73 } |
| 61 cksum | 74 cksum |
| 62 } $cksum | 75 } $cksum |
| 63 ifcapable vacuum { | 76 ifcapable vacuum { |
| 64 do_test vacuum-1.3 { | 77 do_test vacuum-1.3 { |
| 65 expr {[file size test.db]<$::size1} | 78 expr {[file size test.db]<$::size1} |
| 66 } {1} | 79 } {1} |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 execsql { | 355 execsql { |
| 343 VACUUM; | 356 VACUUM; |
| 344 } | 357 } |
| 345 cksum | 358 cksum |
| 346 } $::cksum | 359 } $::cksum |
| 347 } | 360 } |
| 348 | 361 |
| 349 file delete -force {a'z.db} | 362 file delete -force {a'z.db} |
| 350 | 363 |
| 351 finish_test | 364 finish_test |
| OLD | NEW |