1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

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)

FossilOrigin-Name: c5890935a0247090162feda73cfea85012317050
This commit is contained in:
danielk1977
2009-03-30 18:50:04 +00:00
parent 5e8d8878fe
commit f4027782b0
3 changed files with 21 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
C Add\sa\scomment\sto\sthe\spageReinit()\sroutine\sexplaining\swhy\sthe\sreturn\scode\sfrom\nsqlite3BtreeInitPage()\sis\signored.\s\sComment\schange\sonly\s-\sno\schanges\sto\scode.\s(CVS\s6412)
D 2009-03-30T17:19:48
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
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -103,7 +103,7 @@ F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab
F src/btree.c 244dddea3a0550b033beb0aff11fbe063e6737d9
F src/btree.c 304c18b7e3d6e921764cede594c36e755200ce08
F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
F src/build.c be2bdaf2a3f6b24ef08dc14b9fd33aa84c689908
@@ -711,7 +711,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 3c9097f19adae071a12e1114f64993d0c1da1163
R c15d6b785082eeb631152837ce181dcc
U drh
Z cfb8b82928a38324cd93571c1fccef55
P 10f605be8c92ff94625a0da0e23b2ffd55ec7509
R 8a7b0aa172e739710d3e54157b5e7053
U danielk1977
Z 84289aac0f47d82d363ee3a15fa700f0

View File

@@ -1 +1 @@
10f605be8c92ff94625a0da0e23b2ffd55ec7509
c5890935a0247090162feda73cfea85012317050

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.581 2009/03/30 17:19:48 drh Exp $
** $Id: btree.c,v 1.582 2009/03/30 18:50:05 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2480,6 +2480,18 @@ static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
if( nFin==0 ){
iLastPg--;
while( iLastPg==PENDING_BYTE_PAGE(pBt)||PTRMAP_ISPAGE(pBt, iLastPg) ){
if( PTRMAP_ISPAGE(pBt, iLastPg) ){
MemPage *pPg;
int rc = sqlite3BtreeGetPage(pBt, iLastPg, &pPg, 0);
if( rc!=SQLITE_OK ){
return rc;
}
rc = sqlite3PagerWrite(pPg->pDbPage);
releasePage(pPg);
if( rc!=SQLITE_OK ){
return rc;
}
}
iLastPg--;
}
sqlite3PagerTruncateImage(pBt->pPager, iLastPg);