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 # The focus of this file is testing the session module.
15 if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test]
18 source [file join [file dirname [info script]] session_common.tcl]
19 source $testdir/tester.tcl
20 ifcapable !session {finish_test; return}
21 set testprefix sessionfault3
24 CREATE TABLE t1(a, b, PRIMARY KEY(a));
25 INSERT INTO t1 VALUES(1, 2);
26 INSERT INTO t1 VALUES(3, 4);
27 INSERT INTO t1 VALUES('five', 'six');
30 set C1 [changeset_from_sql {
31 INSERT INTO t1 VALUES('seven', 'eight');
32 UPDATE t1 SET b=6 WHERE a='five';
33 DELETE FROM t1 WHERE a=1;
37 ALTER TABLE t1 ADD COLUMN d DEFAULT 123;
38 ALTER TABLE t1 ADD COLUMN e DEFAULT 'string';
41 set C2 [changeset_from_sql {
42 UPDATE t1 SET e='new value' WHERE a='seven';
43 INSERT INTO t1 VALUES(0, 0, 0, 0);
46 do_faultsim_test 1 -faults oom* -prep {
56 faultsim_test_result {0 {}} {1 SQLITE_NOMEM}