3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # Test the outcome of a writer crashing within a call to the VFS
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
19 set testprefix writecrash
24 if {$tcl_platform(platform)=="windows"} {
30 CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB UNIQUE);
32 VALUES(1) UNION ALL SELECT i+1 FROM s WHERE i<100
34 INSERT INTO t1 SELECT NULL, randomblob(900) FROM s;
38 for {set tn 1} {$bGo} {incr tn} {
44 set res [crash_on_write $tn {
45 UPDATE t1 SET b = randomblob(899) WHERE (a%3)==0
48 if {[string match {1 {child killed:*}} $res]} {
58 do_execsql_test 1.$tn.2 { PRAGMA integrity_check } {ok}
63 do_execsql_test 1.$tn.3 { PRAGMA integrity_check } {ok}