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 #***********************************************************************
12 # This test script checks that tickets #2794, #2795, #2796, and #2797
15 # $Id: mallocF.test,v 1.4 2008/02/18 22:24:58 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
19 source $testdir/malloc_common.tcl
21 # Only run these tests if memory debugging is turned on.
24 puts "Skipping mallocF tests: not compiled with -DSQLITE_MEMDEBUG..."
29 # tickets #2794 and #2795 and #2797
33 INSERT INTO t1 VALUES('abc123', 5);
34 INSERT INTO t1 VALUES('xyz987', 42);
36 do_malloc_test malloeF-1 -sqlprep $PREP -sqlbody {
37 SELECT * FROM t1 WHERE x GLOB 'abc*'
43 CREATE TABLE t1(x PRIMARY KEY,y UNIQUE);
44 INSERT INTO t1 VALUES('abc123', 5);
45 INSERT INTO t1 VALUES('xyz987', 42);
47 do_malloc_test malloeF-2 -sqlprep $PREP -sqlbody {
49 WHERE y=1 OR y=2 OR y=3 OR y=4 OR y=5
50 OR y=6 OR y=7 OR y=8 OR y=9 OR y=10
51 OR y=11 OR y=12 OR y=13 OR y=14 OR y=15
56 CREATE TABLE t1(x PRIMARY KEY,y UNIQUE);
57 INSERT INTO t1 VALUES('abc123', 5);
58 INSERT INTO t1 VALUES('xyz987', 42);
60 do_malloc_test malloeF-3 -sqlprep $PREP -sqlbody {
61 SELECT x FROM t1 WHERE y BETWEEN 10 AND 29
68 CREATE TRIGGER r1 BEFORE INSERT ON t1 BEGIN
72 do_malloc_test mallocF-4 -sqlprep $PREP -sqlbody {
73 INSERT INTO t1 VALUES(random());