-C Modifications\sto\smalloc5.test\sto\saccount\sfor\sthe\sfact\sthat\ssqlite3_release_memory()\sno\slonger\sreclaims\sdirty\spages.\s(CVS\s5625)
-D 2008-08-27T16:38:57
+C Do\snot\smark\spages\sas\sclean\swhen\sdoing\sa\sstatement\sjournal\srollback.\s(CVS\s5626)
+D 2008-08-27T18:03:20
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 689e14735f862a5553bceef206d8c13e29504e44
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os_os2.c e391fc95adc744bbdcefd4d11e3066998185a0a0
F src/os_unix.c 4665cef7639dd937893c3ea076f0e8a8f215bb32
F src/os_win.c aefe9ee26430678a19a058a874e4e2bd91398142
-F src/pager.c a38742815a6b2238d0b91d1dd64bda50d6ee95fc
+F src/pager.c 84f4c171a0cb4561291f212508b1a91a8a325abb
F src/pager.h 914103bb62dbcc3d8e9f14baec812d027264d457
F src/parse.y d0f76d2cb8d6883d5600dc20beb961a6022b94b8
F src/pcache.c 3d9d933bb22f10956ab78d83798d88ca9a147e86
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 12f2d24f88e55d170dd7750e7904ff14e84e820e
-R b53ac5363faaa116cc8b7dfcfecb5950
-U danielk1977
-Z c5747597064276f7a0eeb73c949573eb
+P b01c65b065c62e3dd71e88866a953668b5e2f25f
+R 689d729100f20090b1e466716c44a30f
+U drh
+Z 88ce9a46e91a9c5f4a11c03c806a9437
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.483 2008/08/27 15:16:34 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.484 2008/08/27 18:03:20 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
** Read a single page from the journal file opened on file descriptor
** jfd. Playback this one page.
**
-** If useCksum==0 it means this journal does not use checksums. Checksums
-** are not used in statement journals because statement journals do not
-** need to survive power failures.
+** The isMainJrnl flag is true if this is the main rollback journal and
+** false for the statement journal. The main rollback journal uses
+** checksums - the statement journal does not.
*/
static int pager_playback_one_page(
- Pager *pPager,
- sqlite3_file *jfd,
- i64 offset,
- int useCksum
+ Pager *pPager, /* The pager being played back */
+ sqlite3_file *jfd, /* The file that is the journal being rolled back */
+ i64 offset, /* Offset of the page within the journal */
+ int isMainJrnl /* True for main rollback journal. False for Stmt jrnl */
){
int rc;
PgHdr *pPg; /* An existing page in the cache */
u32 cksum; /* Checksum used for sanity checking */
u8 *aData = (u8 *)pPager->pTmpSpace; /* Temp storage for a page */
- /* useCksum should be true for the main journal and false for
+ /* isMainJrnl should be true for the main journal and false for
** statement journals. Verify that this is always the case
*/
- assert( jfd == (useCksum ? pPager->jfd : pPager->stfd) );
+ assert( jfd == (isMainJrnl ? pPager->jfd : pPager->stfd) );
assert( aData );
rc = read32bits(jfd, offset, &pgno);
if( pgno>(unsigned)pPager->dbSize ){
return SQLITE_OK;
}
- if( useCksum ){
+ if( isMainJrnl ){
rc = read32bits(jfd, offset+pPager->pageSize+4, &cksum);
if( rc ) return rc;
pPager->journalOff += 4;
** sqlite3PagerRollback().
*/
void *pData;
- /* assert( pPg->nRef==0 || pPg->pgno==1 ); */
pData = pPg->pData;
memcpy(pData, aData, pPager->pageSize);
if( pPager->xReiniter ){
pPager->xReiniter(pPg, pPager->pageSize);
}
- makeClean(pPg);
+ if( isMainJrnl ) makeClean(pPg);
#ifdef SQLITE_CHECK_PAGES
pPg->pageHash = pager_pagehash(pPg);
#endif