1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned.

FossilOrigin-Name: 8d0f8a7f70d6fb42369411a934b30f8c8ca8322f
This commit is contained in:
dan
2010-06-23 15:55:43 +00:00
parent b316cb22de
commit 10f5a50e57
13 changed files with 324 additions and 152 deletions

View File

@ -19,13 +19,10 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }
proc log_file_size {nFrame pgsz} {
expr {24 + ($pgsz+24)*$nFrame}
}
set ::wal_hook [list]
proc wal_hook {zDb nEntry} {
lappend ::wal_hook $zDb $nEntry
@ -104,7 +101,7 @@ foreach {tn sql dbpages logpages} {
do_test walhook-2.$tn {
execsql $sql
list [file size test.db] [file size test.db-wal]
} [list [expr $dbpages*1024] [log_file_size $logpages 1024]]
} [list [expr $dbpages*1024] [wal_file_size $logpages 1024]]
}
catch { db2 close }