]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add some tests to verify that the parameter to the incremental_vacuum pragma is worki...
authordanielk1977 <danielk1977@noemail.net>
Thu, 24 May 2007 10:18:22 +0000 (10:18 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Thu, 24 May 2007 10:18:22 +0000 (10:18 +0000)
FossilOrigin-Name: 1abf784fe27cdc61b6b944b79d024ea98eb5289e

manifest
manifest.uuid
test/incrvacuum.test

index 4dbc024df207382394f9c7bd02b04f30985eb11e..e522445125be7d8b227f08ff3455335308ae8a23 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stypo\sin\scomments\sin\ssqlite.h.in.\sNo\scode\schanges.\sTicket\s#2384.\s(CVS\s4038)
-D 2007-05-24T09:44:11
+C Add\ssome\stests\sto\sverify\sthat\sthe\sparameter\sto\sthe\sincremental_vacuum\spragma\sis\sworking.\sIt\sis.\s(CVS\s4039)
+D 2007-05-24T10:18:22
 F Makefile.in a42354804b50c2708ce72cf79e4daa30f50191b5
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -258,7 +258,7 @@ F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d
 F test/in2.test b1f447f4f0f67e9f83ff931e7e2e30873f9ea055
 F test/incrblob.test 7f82ae497364612aa17a37f77f12e01e2bee9f20
 F test/incrblob_err.test 2501bec57e317e7051451b5093b47fc61a96c85a
-F test/incrvacuum.test 9dd849d393280352b06d94aa7a69ae969c1635d9
+F test/incrvacuum.test 740f441b9a61a9adff11b0ac57bf392a3414627c
 F test/incrvacuum2.test 82397ceb5941cbe852fd29bb33fcdf5665bc80c2
 F test/incrvacuum_ioerr.test cb331403b8dea3c5bae6163861ff25037b0df56a
 F test/index.test e65df12bed94b2903ee89987115e1578687e9266
@@ -494,7 +494,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 16c8e9c20cd2a7628c20a31c3e9605fe2d92ba2e
-R 31e93049e72accf52aaca917e33c4138
+P e8ae6214bfef4230096b6b56e688e9d4cd93f1b8
+R 114bb7154f3f00accbd22be991d205a9
 U danielk1977
-Z 457de320f3ff18e51a78ea843a897962
+Z 3f53a4a2d46ad174a9eb3dc8ca1b824d
index 68d20b53f0e527227014c0333740d80d1413a296..2c4b8325e3eebdbc2459303fc8d5fa3347e73660 100644 (file)
@@ -1 +1 @@
-e8ae6214bfef4230096b6b56e688e9d4cd93f1b8
\ No newline at end of file
+1abf784fe27cdc61b6b944b79d024ea98eb5289e
\ No newline at end of file
index 54ffa64ac1a72524d545f130530d79c4deb64f7c..a05ad0c5f4ecb5fc69f5701b6409d41e20e34d85 100644 (file)
@@ -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.9 2007/05/24 07:22:42 danielk1977 Exp $
+# $Id: incrvacuum.test,v 1.10 2007/05/24 10:18:22 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -499,5 +499,60 @@ do_test incrvacuum-9.3 {
   }
 } {}
 
+#---------------------------------------------------------------------
+# Test that the parameter to the incremental_vacuum pragma works. That
+# is, if the user executes "PRAGMA incremental_vacuum(N)", at most
+# N pages are vacuumed.
+#
+do_test incrvacuum-10.1 {
+  execsql {
+    DROP TABLE t1;
+    DROP TABLE t2;
+  }
+  expr [file size test.db] / 1024
+} {29}
+
+do_test incrvacuum-10.2 {
+  execsql {
+    PRAGMA incremental_vacuum(1);
+  }
+  expr [file size test.db] / 1024
+} {28}
+
+do_test incrvacuum-10.3 {
+  execsql {
+    PRAGMA incremental_vacuum(5);
+  }
+  expr [file size test.db] / 1024
+} {23}
+
+do_test incrvacuum-10.4 {
+  execsql {
+    PRAGMA incremental_vacuum('1');
+  }
+  expr [file size test.db] / 1024
+} {22}
+
+do_test incrvacuum-10.5 {
+  execsql {
+    PRAGMA incremental_vacuum("3");
+  }
+  expr [file size test.db] / 1024
+} {19}
+
+do_test incrvacuum-10.6 {
+  execsql {
+    PRAGMA incremental_vacuum = 1;
+  }
+  expr [file size test.db] / 1024
+} {18}
+
+do_test incrvacuum-10.7 {
+  execsql {
+    PRAGMA incremental_vacuum(0);
+  }
+  expr [file size test.db] / 1024
+} {1}
+
 finish_test