diff options
author | dan <dan@noemail.net> | 2010-08-23 15:41:24 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-08-23 15:41:24 +0000 |
commit | f48c355b33c19697f0b9c856e2e94263a8cd572a (patch) | |
tree | 6f8f299e27b3a837001bb6d26e72fa532d3260f4 | |
parent | 7d105f87fc66a37e2d859fee600543e592caa881 (diff) | |
download | sqlite-f48c355b33c19697f0b9c856e2e94263a8cd572a.tar.gz sqlite-f48c355b33c19697f0b9c856e2e94263a8cd572a.zip |
Fix for ticket [5e10420e8d].
FossilOrigin-Name: 255f1eefa373153942c67b18b22177933657911d
-rw-r--r-- | manifest | 25 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/btree.c | 4 | ||||
-rw-r--r-- | test/tkt-5e10420e8d.test | 50 |
4 files changed, 63 insertions, 18 deletions
@@ -1,8 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -C Update\sthe\s"showdb"\sdebug\sutility\sto\shandle\s64K\spage\sdatabase\sand\swith\nextra\soptions\sto\sdecode\sthe\sfreelist\sstructure. -D 2010-08-23T15:26:50 +C Fix\sfor\sticket\s[5e10420e8d]. +D 2010-08-23T15:41:24 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -116,7 +113,7 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34 F src/backup.c 8ff0b7018df253c7f30d3f9702b0b16f19209d5c F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff -F src/btree.c 2dff4076d3c994dc1954ec7c1792febd49e13631 +F src/btree.c 5047fb303cdf6806a42676a6f513c57e15b7d69b F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9 F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99 F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38 @@ -643,6 +640,7 @@ F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28 F test/tkt-31338dca7e.test 5741cd48de500347a437ba1be58c8335e83c5a5e F test/tkt-3fe897352e.test 10de1a67bd5c66b238a4c96abe55531b37bb4f00 F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e +F test/tkt-5e10420e8d.test 904d1687b3c06d43e5b3555bbcf6802e7c0ffd84 F test/tkt-5ee23731f.test 3581260f2a71e51db94e1506ba6b0f7311d002a9 F test/tkt-78e04e52ea.test fb5430c675e708f5cbafdf3e7e5593da5145a527 F test/tkt-80e031a00f.test 9a154173461a4dbe2de49cda73963e04842d52f7 @@ -848,14 +846,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 3613b0695a5e990905ab146fadcab34dd04d5874 -R 058fa6e3ab648ae5ff66e22c57c21a88 -U drh -Z 4b496641e3aad55cb1970e3775c32e6e ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQFMcpM9oxKgR168RlERAiQ4AKCNTq26d6guoArVL/8XVQDv9ujn6gCbB8sK -0u6T4zf+ph77zjra1ytd08E= -=CUDO ------END PGP SIGNATURE----- +P 1070918e3b68c0ba5bfab11a97214b87c601f93c +R 45ce7ab03a363e4feb15c9dc292263d2 +U dan +Z ef561b85144cdce9ae177b02b80c54d2 diff --git a/manifest.uuid b/manifest.uuid index 1be9cbc9a..063352e6c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1070918e3b68c0ba5bfab11a97214b87c601f93c
\ No newline at end of file +255f1eefa373153942c67b18b22177933657911d
\ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 83a0fed5f..378a2183e 100644 --- a/src/btree.c +++ b/src/btree.c @@ -4807,6 +4807,10 @@ static int allocateBtreePage( if( !pPrevTrunk ){ memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4); }else{ + rc = sqlite3PagerWrite(pPrevTrunk->pDbPage); + if( rc!=SQLITE_OK ){ + goto end_allocate_page; + } memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); } }else{ diff --git a/test/tkt-5e10420e8d.test b/test/tkt-5e10420e8d.test new file mode 100644 index 000000000..a2dfefdb0 --- /dev/null +++ b/test/tkt-5e10420e8d.test @@ -0,0 +1,50 @@ +# 2010 August 23 +# +# 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. +# +#*********************************************************************** +# + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_execsql_test tkt-5e10420e8d.1 { + PRAGMA page_size = 1024; + PRAGMA auto_vacuum = incremental; + + CREATE TABLE t1(x); + CREATE TABLE t2(x); + CREATE TABLE t3(x); +} {} + +do_execsql_test tkt-5e10420e8d.2 { + INSERT INTO t3 VALUES(randomblob(500 + 1024*248)); + INSERT INTO t1 VALUES(randomblob(1500)); + INSERT INTO t2 VALUES(randomblob(500 + 1024*248)); + + DELETE FROM t3; + DELETE FROM t2; + DELETE FROM t1; +} {} + +do_execsql_test tkt-5e10420e8d.3 { + PRAGMA incremental_vacuum(248) +} {} + +do_execsql_test tkt-5e10420e8d.4 { + PRAGMA incremental_vacuum(1) +} {} + +db close +sqlite3 db test.db + +do_execsql_test tkt-5e10420e8d.5 { + PRAGMA integrity_check; +} {ok} + +finish_test |