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 # $Id: mallocD.test,v 1.6 2008/02/18 22:24:58 drh Exp $
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 source $testdir/malloc_common.tcl
18 # Only run these tests if memory debugging is turned on.
21 puts "Skipping mallocD tests: not compiled with -DSQLITE_MEMDEBUG..."
27 sqlite3_simulate_device -char atomic
28 sqlite3 db test.db -vfs devsym
31 PRAGMA page_size = 1024;
32 CREATE TABLE abc(a, b, c);
35 do_malloc_test mallocD-1 -sqlprep $PREP -sqlbody {
36 INSERT INTO abc VALUES(1, 2, 3);
39 do_malloc_test mallocD-2 -sqlprep $PREP -sqlbody {
41 INSERT INTO abc VALUES(1, 2, 3);
42 INSERT INTO abc VALUES(4, 5, 6);
46 do_malloc_test mallocD-3 -sqlprep $PREP -sqlbody {
48 INSERT INTO abc VALUES(1, 2, 3);
49 INSERT INTO abc VALUES(4, 5, randstr(1500,1500));
54 do_malloc_test mallocD-4 -sqlprep $PREP -sqlbody {
55 ATTACH 'test2.db' AS aux;
57 CREATE TABLE aux.def(d, e, f);
58 INSERT INTO abc VALUES(4, 5, 6);
63 sqlite3_simulate_device -char {}