mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Change the way token memory is allocated in an effort to fix ticket #136.
There is now a memory leak when using views of views. (CVS 725) FossilOrigin-Name: 22d8726e61eec0e53893f492cb2163824b87a23e
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: all.test,v 1.16 2002/08/11 20:10:49 drh Exp $
|
||||
# $Id: all.test,v 1.17 2002/08/24 18:24:57 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -34,6 +34,7 @@ set EXCLUDE {
|
||||
quick.test
|
||||
malloc.test
|
||||
misuse.test
|
||||
memleak.test
|
||||
}
|
||||
# btree2.test
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: quick.test,v 1.3 2002/07/07 16:52:47 drh Exp $
|
||||
# $Id: quick.test,v 1.4 2002/08/24 18:24:57 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -23,6 +23,7 @@ set EXCLUDE {
|
||||
quick.test
|
||||
btree2.test
|
||||
malloc.test
|
||||
memleak.test
|
||||
}
|
||||
|
||||
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
||||
|
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing VIEW statements.
|
||||
#
|
||||
# $Id: view.test,v 1.8 2002/07/16 02:05:45 drh Exp $
|
||||
# $Id: view.test,v 1.9 2002/08/24 18:24:57 drh Exp $
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
@ -265,4 +265,33 @@ do_test view-7.6 {
|
||||
}
|
||||
} {1 2 3}
|
||||
|
||||
do_test view-8.1 {
|
||||
execsql {
|
||||
CREATE VIEW v6 AS SELECT pqr, xyz FROM v1;
|
||||
SELECT * FROM v6 ORDER BY xyz;
|
||||
}
|
||||
} {7 2 13 5 19 8 27 12}
|
||||
if 0 {
|
||||
do_test view-8.2 {
|
||||
db close
|
||||
sqlite db test.db
|
||||
execsql {
|
||||
SELECT * FROM v6 ORDER BY xyz;
|
||||
}
|
||||
} {7 2 13 5 19 8 27 12}
|
||||
do_test view-8.3 {
|
||||
execsql {
|
||||
CREATE VIEW v7 AS SELECT pqr+xyz AS a FROM v6;
|
||||
SELECT * FROM v7 ORDER BY a;
|
||||
}
|
||||
} {9 18 27 39}
|
||||
do_test view-8.4 {
|
||||
execsql { PRAGMA vdbe_trace=on;
|
||||
CREATE VIEW v8 AS SELECT max(cnt) FROM
|
||||
(SELECT a%2 AS eo, count(*) AS cnt FROM t1 GROUP BY eo);
|
||||
SELECT * FROM v8;
|
||||
}
|
||||
} 3
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user