summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/test/autovacuum.test
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
commit997e22224e1062a4cd39373057a68879a1d7a3ac (patch)
treea90a9ce4272fc78f2459b1b2c78b52a3f6d4e5d3 /third_party/sqlite/test/autovacuum.test
parent0d683c611a18dc6ea0e99f38c73b4fb96611041f (diff)
downloadchromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.zip
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.gz
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.bz2
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
Diffstat (limited to 'third_party/sqlite/test/autovacuum.test')
-rw-r--r--third_party/sqlite/test/autovacuum.test37
1 files changed, 34 insertions, 3 deletions
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