On a ROLLBACK, if there page cache entries which are dirty but not in the

rollback journal, make sure they get reinitialized in the btree layer. (CVS 5936)

FossilOrigin-Name: faded96f36229ee85039276db693391d0f10648c
This commit is contained in:
drh
2008-11-21 03:23:43 +00:00
parent 41022645ee
commit c047b9f74d
4 changed files with 68 additions and 32 deletions
+39
View File
@@ -0,0 +1,39 @@
# 2008 November 20
#
# 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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# When a transaction rolls back, make sure that dirty pages in the
# page cache which are not in the rollback journal are reinitialized
# in the btree layer.
#
# $Id: tkt35xx.test,v 1.1 2008/11/21 03:23:43 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_test tkt35xx-1.1 {
execsql {
PRAGMA auto_vacuum = 0;
CREATE TABLE t1(a,b,c);
CREATE INDEX i1 ON t1(c);
INSERT INTO t1 VALUES(0, 0, zeroblob(676));
INSERT INTO t1 VALUES(1, 1, zeroblob(676));
DELETE FROM t1;
BEGIN;
INSERT INTO t1 VALUES(0, 0, zeroblob(676));
INSERT INTO t1 VALUES(1, 1, zeroblob(676));
ROLLBACK;
INSERT INTO t1 VALUES(0, 0, zeroblob(676));
}
execsql {
INSERT INTO t1 VALUES(1, 1, zeroblob(676));
}
} {}