Merge trunk into this branch.
[sqlite.git] / test / returningfault.test
blob8bf6fbfe06427daff90b4c226725c79684489f8f
1 # 2022 January 5
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 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
15 source $testdir/malloc_common.tcl
18 do_execsql_test 1.0 {
19   CREATE TABLE t1 (b);
20 } {}
21 faultsim_save_and_close
23 do_faultsim_test pagerfault-1 -faults oom-t* -prep {
24   faultsim_restore_and_reopen
25 } -body {
26   execsql { 
27     INSERT INTO t1(b) VALUES(65) RETURNING (
28       SELECT * FROM sqlite_temp_schema
29     ) AS aaa;
30   }
31 } -test {
32   faultsim_test_result {1 {sub-select returns 5 columns - expected 1}}
36 finish_test