Make sure the auto_vacuum=INCREMENTAL setting is preserved across a VACUUM.
Ticket #3663. (CVS 6304) FossilOrigin-Name: ded04f12f41504e4a3ecd5164f0d4cbbde5e16f7
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# Note: There are also some tests for incremental vacuum and IO
|
||||
# errors in incrvacuum_ioerr.test.
|
||||
#
|
||||
# $Id: incrvacuum.test,v 1.22 2009/01/30 05:47:15 shane Exp $
|
||||
# $Id: incrvacuum.test,v 1.23 2009/02/18 20:31:18 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -673,9 +673,14 @@ do_test incrvacuum-12.2 {
|
||||
do_test incrvacuum-12.3 {
|
||||
execsql { ROLLBACK; } db2
|
||||
execsql { PRAGMA auto_vacuum }
|
||||
} {1}
|
||||
} {2} ;# Still 2 because PRAGMA auto_vacuum setting held in case of vacuum
|
||||
do_test incrvacuum-12.4 {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql { PRAGMA auto_vacuum }
|
||||
} {1} ;# Revert to 1 because the database file did not change
|
||||
|
||||
do_test incrvacuum-12.3 {
|
||||
do_test incrvacuum-12.5 {
|
||||
execsql { SELECT * FROM sqlite_master }
|
||||
execsql { PRAGMA auto_vacuum }
|
||||
} {1}
|
||||
|
||||
+22
-1
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the VACUUM statement.
|
||||
#
|
||||
# $Id: vacuum2.test,v 1.9 2008/11/10 18:20:16 shane Exp $
|
||||
# $Id: vacuum2.test,v 1.10 2009/02/18 20:31:18 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -155,10 +155,31 @@ ifcapable autovacuum {
|
||||
}
|
||||
} {ok}
|
||||
do_test vacuum2-4.4 {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
pragma auto_vacuum;
|
||||
}
|
||||
} {1}
|
||||
do_test vacuum2-4.5 { # Ticket #3663
|
||||
execsql {
|
||||
pragma auto_vacuum=2;
|
||||
vacuum;
|
||||
pragma auto_vacuum;
|
||||
}
|
||||
} {2}
|
||||
do_test vacuum2-4.6 {
|
||||
execsql {
|
||||
pragma integrity_check
|
||||
}
|
||||
} {ok}
|
||||
do_test vacuum2-4.7 {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
pragma auto_vacuum;
|
||||
}
|
||||
} {2}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user