aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordan <dan@noemail.net>2017-03-02 14:51:47 +0000
committerdan <dan@noemail.net>2017-03-02 14:51:47 +0000
commitcb1b0a693ac7aef2f05c65dba4d4bf5d78d4cf3b (patch)
tree65b4b1409dea7d5209e56c7dfba5a3bb0caac643 /test
parent76adb239805a543742232090cd4399db3f8f46f6 (diff)
downloadsqlite-cb1b0a693ac7aef2f05c65dba4d4bf5d78d4cf3b.tar.gz
sqlite-cb1b0a693ac7aef2f05c65dba4d4bf5d78d4cf3b.zip
When saving the state of an RBU update in the incremental-checkpoint phase,
sync the database file. Otherwise, if a power failure occurs and the RBU update resumed following system recovery, the database may become corrupt. FossilOrigin-Name: edee6a80e1cc7e6a2b8c3c7f76dd794fc8ab9a72
Diffstat (limited to 'test')
-rw-r--r--test/tester.tcl6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/tester.tcl b/test/tester.tcl
index 1da89fec2..dc6547d03 100644
--- a/test/tester.tcl
+++ b/test/tester.tcl
@@ -1533,6 +1533,7 @@ proc crashsql {args} {
set tclbody {}
set crashfile ""
set dc ""
+ set dfltvfs 0
set sql [lindex $args end]
for {set ii 0} {$ii < [llength $args]-1} {incr ii 2} {
@@ -1546,7 +1547,8 @@ proc crashsql {args} {
elseif {$n>1 && [string first $z -file]==0} {set crashfile $z2} \
elseif {$n>1 && [string first $z -tclbody]==0} {set tclbody $z2} \
elseif {$n>1 && [string first $z -blocksize]==0} {set blocksize "-s $z2" } \
- elseif {$n>1 && [string first $z -characteristics]==0} {set dc "-c {$z2}" } \
+ elseif {$n>1 && [string first $z -characteristics]==0} {set dc "-c {$z2}" }\
+ elseif {$n>1 && [string first $z -dfltvfs]==0} {set dfltvfs $z2 }\
else { error "Unrecognized option: $z" }
}
@@ -1560,7 +1562,7 @@ proc crashsql {args} {
set cfile [string map {\\ \\\\} [file nativename [file join [get_pwd] $crashfile]]]
set f [open crash.tcl w]
- puts $f "sqlite3_crash_enable 1"
+ puts $f "sqlite3_crash_enable 1 $dfltvfs"
puts $f "sqlite3_crashparams $blocksize $dc $crashdelay $cfile"
puts $f "sqlite3_test_control_pending_byte $::sqlite_pending_byte"