Update test file walprotocol.test to account for the changes in the wal
[sqlite.git] / test / tkt3761.test
blob2601b151dfa35306948722524adcd9f5f597735a
1 # 2009 March 30
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
12 # Ticket #3761:  Make sure that an incremental vacuum on an in-memory
13 # database can be rolled back.
15 # $Id: tkt3761.test,v 1.1 2009/03/31 02:54:40 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 do_test tkt3761-1.1 {
21   db close
22   sqlite3 db :memory:
23   db eval {
24     PRAGMA auto_vacuum=INCREMENTAL;
25     CREATE TABLE t1(x);
26     INSERT INTO t1 VALUES(zeroblob(900));
27     INSERT INTO t1 VALUES(zeroblob(900));
28     INSERT INTO t1 SELECT x FROM t1;
29     INSERT INTO t1 SELECT x FROM t1;
30     INSERT INTO t1 SELECT x FROM t1;
31     INSERT INTO t1 SELECT x FROM t1;
32     BEGIN;
33     DELETE FROM t1 WHERE rowid%2;
34     PRAGMA incremental_vacuum(4);
35     ROLLBACK;
36   }
37   db eval {PRAGMA integrity_check}
38 } {ok}
40 finish_test