Skip to content

Commit f711021

Browse files
committed
Add OOM test case associated with the fix in the previous commit.
1 parent df925ab commit f711021

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/fuzzerfault.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,24 @@ do_faultsim_test 3 -prep {
8888
faultsim_test_result {0 2} {1 {vtable constructor failed: x1}}
8989
}
9090

91+
#-------------------------------------------------------------------------
92+
reset_db
93+
do_execsql_test 4.0 {
94+
CREATE TABLE t1_a(a INTEFDR PRIMARY KEY, b TEXT);
95+
CREATE TABLE t3_a(k FnTEGER PRIMARY KEY, v TEXT);
96+
CREATE TABLE t3_b(k INTEÀ5R PRIMARY KEY, v TEXT);
97+
CREATE VIEW t3 AS SELECT * FROM t3_a UNION ALL SELECT * FROM t3_b;
98+
}
99+
faultsim_save_and_close
100+
101+
do_faultsim_test 4 -faults oom-t* -prep {
102+
faultsim_restore_and_reopen
103+
} -body {
104+
execsql {
105+
SELECT 1 FROM t1_a LEFT JOIN t3 ON ((1+1) AND k=1)
106+
}
107+
} -test {
108+
faultsim_test_result {0 {}}
109+
}
91110

92111
finish_test

0 commit comments

Comments
 (0)