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 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
16 set ::testprefix fts3fault
18 # If SQLITE_ENABLE_FTS3 is not defined, omit this file.
19 ifcapable !fts3 { finish_test ; return }
21 set ::TMPDBERROR [list 1 \
22 {unable to open a temporary database file for storing temporary tables}
26 # Test error handling in an "ALTER TABLE ... RENAME TO" statement on an
27 # FTS3 table. Specifically, test renaming the table within a transaction
28 # after it has been written to.
31 CREATE VIRTUAL TABLE t1 USING fts3(a);
32 INSERT INTO t1 VALUES('test renaming the table');
33 INSERT INTO t1 VALUES(' after it has been written');
34 INSERT INTO t1 VALUES(' actually other stuff instead');
36 faultsim_save_and_close
37 do_faultsim_test 1 -faults oom* -prep {
38 faultsim_restore_and_reopen
41 DELETE FROM t1 WHERE rowid=2;
49 faultsim_integrity_check
50 faultsim_test_result {0 {}}