From 2929db81674382bc3c2da415507521ae0805b31c Mon Sep 17 00:00:00 2001 From: drh Date: Tue, 31 Mar 2009 00:50:35 +0000 Subject: [PATCH] Added a test case for ticket #3672. (CVS 6414) FossilOrigin-Name: 7f40576dd76cb67f5248739a0ef1fbe496a3b42a --- manifest | 13 ++++++------ manifest.uuid | 2 +- test/tkt3762.test | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 test/tkt3762.test diff --git a/manifest b/manifest index 3833cd891e..cb10dcc90f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\scase\swhere\sa\spointer\smap\spage\swas\snot\sbeing\sjournalled\sbefore\sa\sfile\struncation\sthat\soccurs\sas\spart\sof\san\sincremental\svacuum.\s(CVS\s6413) -D 2009-03-30T18:50:05 +C Added\sa\stest\scase\sfor\sticket\s#3672.\s(CVS\s6414) +D 2009-03-31T00:50:36 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -632,6 +632,7 @@ F test/tkt3630.test 929f64852103054125200bc825c316d5f75d42f7 F test/tkt3718.test 3ee5e25702f3f5a31340b2766d7a7fac2b5ce99c F test/tkt3731.test 8a6e3732f5a8a24eb875a6faf287ef77bb8c0579 F test/tkt3757.test 8f2208930655bbd4f92c14e19e72303a43e098ef +F test/tkt3762.test 2a9f3b03df44ec49ec0cfa8d5da6574c2a7853df F test/tokenize.test ce430a7aed48fc98301611429595883fdfcab5d7 F test/trace.test 951cd0f5f571e7f36bf7bfe04be70f90fb16fb00 F test/trans.test 8b79967a7e085289ec64890c6fdf9d089e1b4a5f @@ -711,7 +712,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 10f605be8c92ff94625a0da0e23b2ffd55ec7509 -R 8a7b0aa172e739710d3e54157b5e7053 -U danielk1977 -Z 84289aac0f47d82d363ee3a15fa700f0 +P c5890935a0247090162feda73cfea85012317050 +R 097d34945e851c286a00b86c7dc21961 +U drh +Z 93ff9e97e073279c0ef106ac40e41d21 diff --git a/manifest.uuid b/manifest.uuid index fb3284b47a..5ceda436dd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c5890935a0247090162feda73cfea85012317050 \ No newline at end of file +7f40576dd76cb67f5248739a0ef1fbe496a3b42a \ No newline at end of file diff --git a/test/tkt3762.test b/test/tkt3762.test new file mode 100644 index 0000000000..c24041c96e --- /dev/null +++ b/test/tkt3762.test @@ -0,0 +1,54 @@ +# 2009 March 28 +# +# 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. +# +#*********************************************************************** +# +# Ticket #3762: Make sure that an incremental vacuum that reduces the +# size of the database file such that a pointer-map page is elemented +# can be correctly rolled back. +# +# That ticket #3762 has been fixed has already been verified by the +# savepoint6.test test script. But this script is simplier and a +# redundant test never hurts. +# +# $Id: tkt3762.test,v 1.1 2009/03/31 00:50:36 drh Exp $ + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_test tkt3762-1.1 { + db eval { + PRAGMA auto_vacuum=INCREMENTAL; + PRAGMA page_size=1024; + PRAGMA cache_size=10; + CREATE TABLE t1(x); + INSERT INTO t1 VALUES(zeroblob(900)); + INSERT INTO t1 VALUES(zeroblob(900)); + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + INSERT INTO t1 SELECT x FROM t1; + DELETE FROM t1 WHERE rowid>202; + VACUUM; + + BEGIN; + DELETE FROM t1 WHERE rowid IN (10,11,12) ; + PRAGMA incremental_vacuum(10); + UPDATE t1 SET x=zeroblob(900) WHERE rowid BETWEEN 100 AND 110; + INSERT INTO t1 VALUES(zeroblob(39000)); + SELECT count(*) FROM t1; + ROLLBACK; + } + db eval {PRAGMA integrity_check} +} {ok} + +finish_test -- 2.47.2