-C Add\snew\stest\sscript\sbackcompat.test,\sfor\stesting\sdatabase/journal/wal\sfile\scompatibility\sagainst\sprevious\sversions.
-D 2010-08-19T11:05:54
+C Modify\sthe\scode\sfor\sreading\shot-journal\sfiles\sso\sthat\sit\scan\shandle\sjournals\sgenerated\sby\sversions\s3.5.7\sand\searlier.
+D 2010-08-19T15:11:34
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e
F src/os_unix.c 11194cbcf6a57456e58022dc537ab8c3497d9bb9
F src/os_win.c 51cb62f76262d961ea4249489383d714501315a7
-F src/pager.c 8b73d7f47d0143f7b9571125c6f897b8f1c59435
+F src/pager.c 3e9815178b2f3ffcf9f5a6b7d40212be77b4f5bf
F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07
F test/autovacuum.test bb7c0885e6f8f1d633045de48f2b66082162766d
F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
-F test/backcompat.test 5bf6bd795d9a0ec3c68ba8483c35c6fdab3a85a8
+F test/backcompat.test a64138b3f00bcb6af91fb609e805b03a7d74e690
F test/backup.test 200e64bd91244b73ca8094bc1e03dfc83cc94c2e
F test/backup2.test b7c69f937c912e85ac8a5dbd1e1cf290302b2d49
F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P e127192d106bd7e036caacf01bf7725eeaa85dbe
-R 483010ace30045b3aabe4559c5204690
+P 8804f4989d157707911488781109ce0641c0ad0b
+R 8a8db0863e0d33ddc8ea68f9c11cd0ea
U dan
-Z f27bf406a20d9eac5bd8544c4021a73e
+Z 9fa359ca155f08d9a7ed0d63491f2a4b
source $testdir/tester.tcl
source $testdir/lock_common.tcl
source $testdir/malloc_common.tcl
+db close
# Search for binaries to test against. Any executable files that match
# our naming convention are assumed to be testfixture binaries to test
# against.
#
set binaries [list]
-set pattern "[file tail [info nameofexec]]?*"
+set pattern "[file tail [info nameofexec]]*"
foreach file [glob $pattern] {
if {[file executable $file]} {lappend binaries $file}
}
puts "Testing against $bin - version [get_version $bin]"
}
-#set binaries testfixture
+proc do_backcompat_test {rv bin1 bin2 script} {
-proc do_backcompat_test {rv binary script} {
+ file delete -force test.db
+
+ if {$bin1 != ""} { set ::bc_chan1 [launch_testfixture $bin1] }
+ set ::bc_chan2 [launch_testfixture $bin2]
if { $rv } {
- proc code1 {tcl} { testfixture $::bc_chan $tcl }
proc code2 {tcl} { uplevel #0 $tcl }
+ if {$bin1 != ""} { proc code2 {tcl} { testfixture $::bc_chan1 $tcl } }
+ proc code1 {tcl} { testfixture $::bc_chan2 $tcl }
} else {
proc code1 {tcl} { uplevel #0 $tcl }
- proc code2 {tcl} { testfixture $::bc_chan $tcl }
+ if {$bin1 != ""} { proc code1 {tcl} { testfixture $::bc_chan1 $tcl } }
+ proc code2 {tcl} { testfixture $::bc_chan2 $tcl }
}
proc sql1 sql { code1 [list db eval $sql] }
proc sql2 sql { code2 [list db eval $sql] }
- file delete -force test.db
-
- set ::bc_chan [launch_testfixture $binary]
code1 { sqlite3 db test.db }
code2 { sqlite3 db test.db }
catch { code1 { db close } }
catch { code2 { db close } }
- catch { close $::bc_chan }
+ catch { close $::bc_chan2 }
+ catch { close $::bc_chan1 }
}
array set ::incompatible [list]
set nErr [set_test_counter errors]
foreach dir {0 1} {
- set ::bcname ".$dir.[string map {testfixture {}} $bin]."
+ set ::bcname ".[string map {testfixture {}} $bin].$dir."
rename do_test _do_test
proc do_test {nm sql res} {
uplevel [list _do_test $nm $sql $res]
}
- do_backcompat_test $dir $bin $script
+ do_backcompat_test $dir {} $bin $script
rename do_test {}
rename _do_test do_test
# Test that one version can roll back a hot-journal file left in the
# file-system by the other version.
#
+ # Each test case is named "backcompat-1.X...", where X is either 0 or
+ # 1. If it is 0, then the current version creates a journal file that
+ # the old versions try to read. Otherwise, if X is 1, then the old version
+ # creates the journal file and we try to read it with the current version.
+ #
do_test backcompat-1.2.1 { sql1 {
PRAGMA cache_size = 10;
BEGIN;
UPDATE t1 SET a = randomblob(500);
} } {}
set data [read_file_system]
+
+ set f "test.db-journal[incr x]"
+ file copy -force test.db-journal $f
+
do_test backcompat-1.2.4 { sql1 { COMMIT } } {}
set same [expr {[sql2 {SELECT md5sum(a), md5sum(b) FROM t1}] == $cksum2}]
do_test backcompat-1.2.5 [list set {} $same] 0
+ code1 { db close }
+ code2 { db close }
write_file_system $data
+ code1 { sqlite3 db test.db }
+ code2 { sqlite3 db test.db }
+
set same [expr {[sql2 {SELECT md5sum(a), md5sum(b) FROM t1}] == $cksum2}]
do_test backcompat-1.2.6 [list set {} $same] 1
- do_test backcompat-1.2.7 { sql2 { PRAGMA integrity_check } } {ok}
+ do_test backcompat-1.2.7 { sql1 { PRAGMA integrity_check } } {ok}
do_test backcompat-1.2.8 { sql2 { PRAGMA integrity_check } } {ok}
}