gitlab.com/CoiaPrant/sqlite3@v1.19.1/testdata/tcl/returningfault.test (about) 1 # 2022 January 5 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 # 12 13 set testdir [file dirname $argv0] 14 source $testdir/tester.tcl 15 source $testdir/malloc_common.tcl 16 17 18 do_execsql_test 1.0 { 19 CREATE TABLE t1 (b); 20 } {} 21 faultsim_save_and_close 22 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}} 33 } 34 35 36 finish_test