1# 2007 Aug 29 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# This test script checks that ticket #2784 has been fixed. 13# 14# $Id: mallocE.test,v 1.1 2007/11/21 15:24:01 drh Exp $ 15 16set testdir [file dirname $argv0] 17source $testdir/tester.tcl 18 19# Only run these tests if memory debugging is turned on. 20# 21ifcapable !memdebug { 22 puts "Skipping mallocE tests: not compiled with -DSQLITE_MEMDEBUG..." 23 finish_test 24 return 25} 26source $testdir/malloc_common.tcl 27 28set PREP { 29 PRAGMA page_size = 1024; 30 CREATE TABLE t1(a, b, c); 31 CREATE TABLE t2(x, y, z); 32} 33 34do_malloc_test mallocE-1 -sqlprep $PREP -sqlbody { 35 SELECT p, q FROM (SELECT a+b AS p, b+c AS q FROM t1, t2 WHERE c>5) 36 LEFT JOIN t2 ON p=x; 37} 38 39finish_test 40