4 # The author disclaims copyright to this source code. In place of
5 # a legal notice, here is a blessing:
7 # May you do good and not evil.
8 # May you find forgiveness for yourself and forgive others.
9 # May you share freely, never taking more than you give.
11 #***********************************************************************
12 # This file implements regression tests for SQLite library.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 source $testdir/malloc_common.tcl
18 set ::testprefix tkt-9f2eb3abac
21 CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,d,e));
22 SELECT * FROM t1 WHERE a=? AND b=? AND c=? AND d=? AND e=?;
29 PRIMARY KEY ("b", "c")
37 "i" character(10) NOT NULL,
39 PRIMARY KEY ("e", "g", "f", "h")
42 CREATE TABLE "d_to_a" (
43 "f_e" integer NOT NULL,
44 "f_g" integer NOT NULL,
45 "f_f" integer NOT NULL,
46 "f_h" integer NOT NULL,
47 "t_b" integer NOT NULL,
48 "t_c" integer NOT NULL,
49 "r" character NOT NULL,
51 PRIMARY KEY ("f_e", "f_g", "f_f", "f_h", "t_b", "t_c")
54 INSERT INTO d (g, e, h, f, j, i) VALUES ( 1, 1, 1, 1, 1, 1 );
55 INSERT INTO a (b, c) VALUES ( 1, 1 );
56 INSERT INTO d_to_a VALUES (1, 1, 1, 1, 1, 1, 1, 1);
59 WHERE f_g = 1 AND f_e = 1 AND f_h = 1 AND f_f = 1 AND t_b = 1 AND t_c = 1;
64 faultsim_delete_and_reopen
65 do_execsql_test 2.0 { CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,d,e)) }
66 do_execsql_test 2.1 { CREATE TABLE t2(x) }
67 faultsim_save_and_close
69 do_faultsim_test 3 -faults oom* -prep {
70 faultsim_restore_and_reopen
71 execsql { SELECT 1 FROM sqlite_master }
73 execsql { SELECT * FROM t1,t2 WHERE a=? AND b=? AND c=? AND d=? AND e=? }
75 faultsim_test_result {0 {}}