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 source [file join [file dirname [info script]] fts5_common.tcl]
14 source $testdir/malloc_common.tcl
15 set testprefix fts5faultG
17 # If SQLITE_ENABLE_FTS5 is defined, omit this file.
23 set ::testprefix fts5faultG
27 CREATE VIRTUAL TABLE t1 USING fts5(a);
28 INSERT INTO t1 VALUES('test renaming the table');
29 INSERT INTO t1 VALUES(' after it has been written');
30 INSERT INTO t1 VALUES(' actually other stuff instead');
32 faultsim_save_and_close
33 do_faultsim_test 1 -faults oom* -prep {
34 faultsim_restore_and_reopen
37 DELETE FROM t1 WHERE rowid=2;
45 faultsim_integrity_check
46 faultsim_test_result {0 {}}
51 CREATE VIRTUAL TABLE t1 USING fts5(a, content=, contentless_delete=1);
53 INSERT INTO t1 VALUES('here''s some text');
54 INSERT INTO t1 VALUES('useful stuff, text');
55 INSERT INTO t1 VALUES('what would we do without text!');
58 faultsim_save_and_close
59 do_faultsim_test 2 -faults oom* -prep {
60 faultsim_restore_and_reopen
63 DELETE FROM t1 WHERE rowid=2;
67 INSERT INTO t1(t1) VALUES('optimize');
70 faultsim_integrity_check
71 faultsim_test_result {0 {}}