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

Candidate fix for a pager bug associated with sqlite3PagerMovepage().

FossilOrigin-Name: 8c046eb6d16682d5e755624deb4f76f57350b9c9
This commit is contained in:
drh
2010-04-09 15:34:06 +00:00
parent 6498f0bb2e
commit 05f69dd388
3 changed files with 12 additions and 11 deletions

View File

@@ -1508,11 +1508,12 @@ static int pager_playback_one_page(
(isMainJrnl?"main-journal":"sub-journal")
));
if( (pPager->state>=PAGER_EXCLUSIVE)
&& (pPg==0 || 0==(pPg->flags&PGHDR_NEED_SYNC))
&& (!isSavepnt || pPg==0 || 0==(pPg->flags&PGHDR_NEED_SYNC))
&& isOpen(pPager->fd)
&& !isUnsync
){
i64 ofst = (pgno-1)*(i64)pPager->pageSize;
testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 );
rc = sqlite3OsWrite(pPager->fd, (u8*)aData, pPager->pageSize, ofst);
if( pgno>pPager->dbFileSize ){
pPager->dbFileSize = pgno;