-C Add\sanother\sscenario\sto\sthe\ssoak1.tcl\sscript.\s(CVS\s4081)
-D 2007-06-16T14:19:37
+C Modify\sthe\stests\sin\sexclusive2.test\sto\saccount\sfor\sthe\sfact\sthat\sthe\spager\scache\smay\sbe\svery\ssmall\sby\sdefault.\sThese\stests\sare\sonly\svalid\sif\sthe\sentire\sdatabase\sfitting\sin\sthe\scache.\s(CVS\s4082)
+D 2007-06-16T14:43:52
F Makefile.in b9971ab07868cf2b3209fe3bf8c52e7e25af4193
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F test/enc2.test 45710bacfa9df29720bc84c067dfdf8c8ddfb797
F test/enc3.test 9331988b9d72decec96995c90637e87b00d747a5
F test/exclusive.test 5bc520ba366ae3d242420af025ab64d465b04706
-F test/exclusive2.test f9738964b01e0bc4d4e5e270e347ca162da51799
+F test/exclusive2.test 3496656375dc88e97d704c2d5d2c93d626cb7104
F test/exclusive3.test 0e49c35b7e7cb8e7280b4ce3f0359d30b207d2ff
F test/expr.test 93931366f660dc84ba36eaf390f670b27d2c03e8
F test/filefmt.test 053b622009fbbb74dd37921ffad374d852c13cd8
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 57bf8204cde47dfeb31c064f2b128b9a8d94189f
-R d7bfa5ee51c1074ea7aa01f17fe681ef
-U drh
-Z 380c1ba94ab41ce14e0117d755c9e29d
+P 10e6822d4f1e0a94d5033b7b9efc1d8ed1e957d1
+R 1d1b1769be7545513988c0696b58e024
+U danielk1977
+Z 5ed1041deb438cdb83ffe8e125caddda
#***********************************************************************
# This file implements regression tests for SQLite library.
#
-# $Id: exclusive2.test,v 1.5 2007/04/25 12:06:59 drh Exp $
+# $Id: exclusive2.test,v 1.6 2007/06/16 14:43:52 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# sees the change-counter has been incremented and discards the
# invalid in-memory cache.
#
+# This will only work if the database cache is large enough to hold
+# the entire database. In the case of 1024 byte pages, this means
+# the cache size must be at least 17. Otherwise, some pages will be
+# loaded from the database file in step 8.
+#
do_test exclusive2-1.1 {
execsql {
BEGIN;
SELECT count(*) FROM t1;
}
} {64}
+do_test exclusive2-1.2.1 {
+ # Make sure the pager cache is large enough to store the
+ # entire database.
+ set nPage [expr [file size test.db]/1024]
+ if {$::SQLITE_DEFAULT_CACHE_SIZE < $nPage} {
+ execsql "PRAGMA cache_size = $nPage"
+ }
+ expr {[execsql {PRAGMA cache_size}] >= $nPage}
+} {1}
do_test exclusive2-1.2 {
set ::sig [t1sig]
pagerChangeCounter test.db
# SQLite detects the modified change-counter and discards the
# in-memory cache. Then it finds the corruption caused in step 4....
#
+# As above, this test is only applicable if the pager cache is
+# large enough to hold the entire database. With 1024 byte pages,
+# this means 19 pages.
+#
do_test exclusive2-2.1 {
execsql {PRAGMA locking_mode = exclusive;}
execsql {
SELECT count(*) FROM t1;
}
} {64}
+do_test exclusive2-2.2.1 {
+ # Make sure the pager cache is large enough to store the
+ # entire database.
+ set nPage [expr [file size test.db]/1024]
+ if {$::SQLITE_DEFAULT_CACHE_SIZE < $nPage} {
+ execsql "PRAGMA cache_size = $nPage"
+ }
+ expr {[execsql {PRAGMA cache_size}] >= $nPage}
+} {1}
do_test exclusive2-2.2 {
set ::sig [t1sig]
pagerChangeCounter test.db