sl@0: # 2008 August 01 sl@0: # sl@0: # The author disclaims copyright to this source code. In place of sl@0: # a legal notice, here is a blessing: sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #*********************************************************************** sl@0: # sl@0: # This test script checks malloc failures in various obscure operations. sl@0: # sl@0: # $Id: mallocI.test,v 1.1 2008/08/02 03:50:39 drh Exp $ sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: source $testdir/malloc_common.tcl sl@0: sl@0: # Malloc failures in a view. sl@0: # sl@0: do_malloc_test mallocI-1 -sqlprep { sl@0: CREATE TABLE t1(a,b,c,d); sl@0: CREATE VIEW v1 AS SELECT a*b, c*d FROM t1 ORDER BY b-d; sl@0: } -sqlbody { sl@0: SELECT * FROM v1 sl@0: } sl@0: sl@0: # Malloc failure while trying to service a pragma on a TEMP database. sl@0: # sl@0: do_malloc_test mallocI-2 -sqlbody { sl@0: PRAGMA temp.page_size sl@0: } sl@0: sl@0: # Malloc failure while creating a table from a SELECT statement. sl@0: # sl@0: do_malloc_test mallocI-3 -sqlprep { sl@0: CREATE TABLE t1(a,b,c); sl@0: } -sqlbody { sl@0: CREATE TABLE t2 AS SELECT b,c FROM t1; sl@0: } sl@0: sl@0: finish_test