1# 2010 June 15 2# 3# The author disclaims copyright to this source code. In place of 4# a legal notice, here is a blessing: 5# 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. 9# 10#*********************************************************************** 11# 12 13set testdir [file dirname $argv0] 14source $testdir/tester.tcl 15source $testdir/lock_common.tcl 16source $testdir/malloc_common.tcl 17set testprefix pragmafault 18 19db close 20sqlite3 db test.db 21sqlite3_db_config_lookaside db 0 0 0 22do_execsql_test 1.0 { 23 CREATE TABLE t1(a, b, CHECK(a!=b)); 24 INSERT INTO t1 VALUES(1, 2); 25 INSERT INTO t1 VALUES(3, 4); 26} 27faultsim_save_and_close 28 29do_faultsim_test 1 -prep { 30 faultsim_restore_and_reopen 31} -body { 32 catchsql { PRAGMA integrity_check } 33 set {} 0 34} -test { 35 faultsim_test_result {0 0} 36} 37 38 39finish_test 40