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 #***********************************************************************
11 # This file implements regression tests for SQLite library.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 set testprefix filterfault
18 ifcapable !windowfunc {
24 CREATE TABLE t1(a, b, c, d);
25 INSERT INTO t1 VALUES(1, 2, 3, 4);
26 INSERT INTO t1 VALUES(5, 6, 7, 8);
27 INSERT INTO t1 VALUES(9, 10, 11, 12);
29 faultsim_save_and_close
31 do_faultsim_test 1 -faults oom-t* -prep {
32 faultsim_restore_and_reopen
35 SELECT sum(a) FILTER (WHERE b<5),
36 count() FILTER (WHERE d!=c)
37 FROM t1 GROUP BY c ORDER BY 1;
40 faultsim_test_result {0 {{} 1 {} 1 1 1}}