From 997e22224e1062a4cd39373057a68879a1d7a3ac Mon Sep 17 00:00:00 2001 From: "mdm@chromium.org" Date: Fri, 18 Sep 2009 18:27:25 +0000 Subject: Update sqlite to version 3.6.18, porting our patches. Hopefully this will help to address some valgrind issues. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26596 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/sqlite/test/autovacuum.test | 37 ++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'third_party/sqlite/test/autovacuum.test') diff --git a/third_party/sqlite/test/autovacuum.test b/third_party/sqlite/test/autovacuum.test index 9b3ab4a..b843707 100644 --- a/third_party/sqlite/test/autovacuum.test +++ b/third_party/sqlite/test/autovacuum.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the SELECT statement. # -# $Id: autovacuum.test,v 1.27 2008/08/02 03:50:39 drh Exp $ +# $Id: autovacuum.test,v 1.29 2009/04/06 17:50:03 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -484,7 +484,7 @@ do_test autovacuum-3.6 { PRAGMA auto_vacuum = 1; PRAGMA auto_vacuum; } -} $AUTOVACUUM +} [expr $AUTOVACUUM ? 1 : 0] do_test autovacuum-3.7 { execsql { DROP TABLE av1; @@ -660,6 +660,37 @@ do_test autovacuum-8.2 { } {1 {database is locked}} catch {db2 close} catch {db eval {COMMIT}} - + +do_test autovacuum-9.1 { + execsql { + DROP TABLE t1; + DROP TABLE t2; + DROP TABLE t3; + DROP TABLE t4; + DROP TABLE t5; + PRAGMA page_count; + } +} {1} +do_test autovacuum-9.2 { + file size test.db +} 1024 +do_test autovacuum-9.3 { + execsql { + CREATE TABLE t1(a INTEGER PRIMARY KEY, b); + INSERT INTO t1 VALUES(NULL, randstr(50,50)); + } + for {set ii 0} {$ii < 10} {incr ii} { + db eval { INSERT INTO t1 SELECT NULL, randstr(50,50) FROM t1 } + } + file size test.db +} $::sqlite_pending_byte +do_test autovacuum-9.4 { + execsql { INSERT INTO t1 SELECT NULL, randstr(50,50) FROM t1 } +} {} +do_test autovacuum-9.5 { + execsql { DELETE FROM t1 WHERE rowid > (SELECT max(a)/2 FROM t1) } + file size test.db +} $::sqlite_pending_byte + finish_test -- cgit v1.1