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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 # Additional tests. | 647 # Additional tests. |
648 # | 648 # |
649 # Try to determine the autovacuum setting for a database that is locked. | 649 # Try to determine the autovacuum setting for a database that is locked. |
650 # | 650 # |
651 do_test autovacuum-8.1 { | 651 do_test autovacuum-8.1 { |
652 db close | 652 db close |
653 sqlite3 db test.db | 653 sqlite3 db test.db |
654 sqlite3 db2 test.db | 654 sqlite3 db2 test.db |
655 db eval {PRAGMA auto_vacuum} | 655 db eval {PRAGMA auto_vacuum} |
656 } {1} | 656 } {1} |
657 do_test autovacuum-8.2 { | 657 if {[permutation] == ""} { |
658 db eval {BEGIN EXCLUSIVE} | 658 do_test autovacuum-8.2 { |
659 catchsql {PRAGMA auto_vacuum} db2 | 659 db eval {BEGIN EXCLUSIVE} |
660 } {1 {database is locked}} | 660 catchsql {PRAGMA auto_vacuum} db2 |
661 catch {db2 close} | 661 } {1 {database is locked}} |
662 catch {db eval {COMMIT}} | 662 catch {db2 close} |
| 663 catch {db eval {COMMIT}} |
| 664 } |
663 | 665 |
664 do_test autovacuum-9.1 { | 666 do_test autovacuum-9.1 { |
665 execsql { | 667 execsql { |
666 DROP TABLE t1; | 668 DROP TABLE t1; |
667 DROP TABLE t2; | 669 DROP TABLE t2; |
668 DROP TABLE t3; | 670 DROP TABLE t3; |
669 DROP TABLE t4; | 671 DROP TABLE t4; |
670 DROP TABLE t5; | 672 DROP TABLE t5; |
671 PRAGMA page_count; | 673 PRAGMA page_count; |
672 } | 674 } |
(...skipping 14 matching lines...) Expand all Loading... |
687 do_test autovacuum-9.4 { | 689 do_test autovacuum-9.4 { |
688 execsql { INSERT INTO t1 SELECT NULL, randstr(50,50) FROM t1 } | 690 execsql { INSERT INTO t1 SELECT NULL, randstr(50,50) FROM t1 } |
689 } {} | 691 } {} |
690 do_test autovacuum-9.5 { | 692 do_test autovacuum-9.5 { |
691 execsql { DELETE FROM t1 WHERE rowid > (SELECT max(a)/2 FROM t1) } | 693 execsql { DELETE FROM t1 WHERE rowid > (SELECT max(a)/2 FROM t1) } |
692 file size test.db | 694 file size test.db |
693 } $::sqlite_pending_byte | 695 } $::sqlite_pending_byte |
694 | 696 |
695 | 697 |
696 finish_test | 698 finish_test |
OLD | NEW |