1# 2021 February 18 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/malloc_common.tcl 16set testprefix altermalloc3 17 18# If SQLITE_OMIT_ALTERTABLE is defined, omit this file. 19ifcapable !altertable { 20 finish_test 21 return 22} 23 24do_execsql_test 1.0 { 25 CREATE TABLE t1(a, b, c, d, PRIMARY KEY(d, b)) WITHOUT ROWID; 26 INSERT INTO t1 VALUES(1, 2, 3, 4); 27} 28faultsim_save_and_close 29 30do_faultsim_test 1 -prep { 31 faultsim_restore_and_reopen 32} -body { 33 execsql { ALTER TABLE t1 DROP COLUMN c } 34} -test { 35 faultsim_test_result {0 {}} 36} 37 38 39finish_test 40 41