xref: /sqlite-3.40.0/test/mallocM.test (revision c3becddb)
1# 2017 March 13
2#
3# The author disclaims copyright to this source code.  In place of
4# a legal notice, here is a blessing:
5#
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.
9#
10#***********************************************************************
11# Further OOM tests.
12#
13
14set testdir [file dirname $argv0]
15source $testdir/tester.tcl
16source $testdir/malloc_common.tcl
17set testprefix mallocM
18
19sqlite3_db_config_lookaside db 0 0 0
20
21do_execsql_test 1.0 {
22  CREATE TABLE t1(x);
23}
24do_faultsim_test 1 -faults oom-t* -body {
25  execsql {
26    SELECT 'abc' FROM ( SELECT 'xyz' FROM t1 WHERE (SELECT 1) )
27  }
28} -test {
29  faultsim_test_result {0 {}}
30}
31
32finish_test
33