/ Check-in [7f40576d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added a test case for ticket #3672. (CVS 6414)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7f40576dd76cb67f5248739a0ef1fbe496a3b42a
User & Date: drh 2009-03-31 00:50:36
Context
2009-03-31
01:32
Remove two unused lines from pcache.c. (CVS 6415) check-in: d5cab05c user: drh tags: trunk
00:50
Added a test case for ticket #3672. (CVS 6414) check-in: 7f40576d user: drh tags: trunk
2009-03-30
18:50
Fix a case where a pointer map page was not being journalled before a file truncation that occurs as part of an incremental vacuum. (CVS 6413) check-in: c5890935 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Added test/tkt3762.test.

            1  +# 2009 March 28
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            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.
            9  +#
           10  +#***********************************************************************
           11  +#
           12  +# Ticket #3762:  Make sure that an incremental vacuum that reduces the
           13  +# size of the database file such that a pointer-map page is elemented
           14  +# can be correctly rolled back.
           15  +#
           16  +# That ticket #3762 has been fixed has already been verified by the
           17  +# savepoint6.test test script.  But this script is simplier and a
           18  +# redundant test never hurts.
           19  +#
           20  +# $Id: tkt3762.test,v 1.1 2009/03/31 00:50:36 drh Exp $
           21  +
           22  +set testdir [file dirname $argv0]
           23  +source $testdir/tester.tcl
           24  +
           25  +do_test tkt3762-1.1 {
           26  +  db eval {
           27  +    PRAGMA auto_vacuum=INCREMENTAL;
           28  +    PRAGMA page_size=1024;
           29  +    PRAGMA cache_size=10;
           30  +    CREATE TABLE t1(x);
           31  +    INSERT INTO t1 VALUES(zeroblob(900));
           32  +    INSERT INTO t1 VALUES(zeroblob(900));
           33  +    INSERT INTO t1 SELECT x FROM t1;
           34  +    INSERT INTO t1 SELECT x FROM t1;
           35  +    INSERT INTO t1 SELECT x FROM t1;
           36  +    INSERT INTO t1 SELECT x FROM t1;
           37  +    INSERT INTO t1 SELECT x FROM t1;
           38  +    INSERT INTO t1 SELECT x FROM t1;
           39  +    INSERT INTO t1 SELECT x FROM t1;
           40  +    DELETE FROM t1 WHERE rowid>202;
           41  +    VACUUM;
           42  +    
           43  +    BEGIN;
           44  +    DELETE FROM t1 WHERE rowid IN (10,11,12) ;
           45  +    PRAGMA incremental_vacuum(10);
           46  +    UPDATE t1 SET x=zeroblob(900) WHERE rowid BETWEEN 100 AND 110;
           47  +    INSERT INTO t1 VALUES(zeroblob(39000));
           48  +    SELECT count(*) FROM t1;
           49  +    ROLLBACK;
           50  +  }
           51  +  db eval {PRAGMA integrity_check}
           52  +} {ok}
           53  +
           54  +finish_test