diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 18:27:25 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 18:27:25 +0000 |
commit | 997e22224e1062a4cd39373057a68879a1d7a3ac (patch) | |
tree | a90a9ce4272fc78f2459b1b2c78b52a3f6d4e5d3 /third_party/sqlite/test/tkt3918.test | |
parent | 0d683c611a18dc6ea0e99f38c73b4fb96611041f (diff) | |
download | chromium_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/tkt3918.test')
-rw-r--r-- | third_party/sqlite/test/tkt3918.test | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/third_party/sqlite/test/tkt3918.test b/third_party/sqlite/test/tkt3918.test new file mode 100644 index 0000000..c46ad8f --- /dev/null +++ b/third_party/sqlite/test/tkt3918.test @@ -0,0 +1,60 @@ +# 2009 June 17 +# +# The author disclaims copyright to this source code. In place of +# a legal notice, here is a blessing: +# +# May you do good and not evil. +# May you find forgiveness for yourself and forgive others. +# May you share freely, never taking more than you give. +# +#*********************************************************************** +# +# $Id: tkt3918.test,v 1.1 2009/06/17 11:13:28 danielk1977 Exp $ + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_test tkt3918.1 { + execsql { + PRAGMA page_size = 1024; + PRAGMA auto_vacuum = incremental; + CREATE TABLE t1(i, x); + } +} {} +do_test tkt3918.2 { + execsql { + INSERT INTO t1 VALUES(1, randstr(1000,1000)); + INSERT INTO t1 VALUES(2, zeroblob(248*1020 + 100)); + INSERT INTO t1 VALUES(3, zeroblob(2*1020 + 100)); + } +} {} + +# This set of statements sets up the free list so that the +# first free-list trunk page contains only a single leaf. +# The leaf page is also the last page in the database. The +# second free-list trunk page contains, amongst other things, +# page number 4. +do_test tkt3918.3 { + execsql { + DELETE FROM t1 WHERE i = 2; + DELETE FROM t1 WHERE i = 1; + DELETE FROM t1 WHERE i = 3; + } +} {} + +# Incrementally vacuum the database to reduce its size by a single +# page. This will remove the single leaf from the first page in +# the linked list of free-list trunk pages. +do_test tkt3918.4 { + execsql { PRAGMA incremental_vacuum = 1 } +} {} + +# Create another table. This operation will attempt to extract +# page 4 from the database free-list. Bug 3918 caused sqlite to +# incorrectly report corruption here. +do_test tkt3918.5 { + execsql { CREATE TABLE t2(a, b) } +} {} + +finish_test + |