mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix an assert() failure occuring in corrupt.test. (CVS 4034)
FossilOrigin-Name: 3c54cddf23e3b9f62815d1b825110563f78cc325
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.340 2007/05/09 20:35:31 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.341 2007/05/24 07:22:42 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@@ -1081,6 +1081,10 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
|
||||
** page in the pager cache. In this case just update the pager cache,
|
||||
** not the database file. The page is left marked dirty in this case.
|
||||
**
|
||||
** An exception to the above rule: If the database is in no-sync mode
|
||||
** and a page is moved during an incremental vacuum then the page may
|
||||
** not be in the pager cache.
|
||||
**
|
||||
** If in EXCLUSIVE state, then we update the pager cache if it exists
|
||||
** and the main file. The page is then marked not dirty.
|
||||
**
|
||||
@@ -1098,7 +1102,7 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
|
||||
** cache or else it is marked as needSync==0.
|
||||
*/
|
||||
pPg = pager_lookup(pPager, pgno);
|
||||
assert( pPager->state>=PAGER_EXCLUSIVE || pPg!=0 );
|
||||
assert( pPager->state>=PAGER_EXCLUSIVE || pPg!=0 || pPager->noSync );
|
||||
PAGERTRACE3("PLAYBACK %d page %d\n", PAGERID(pPager), pgno);
|
||||
if( pPager->state>=PAGER_EXCLUSIVE && (pPg==0 || pPg->needSync==0) ){
|
||||
rc = sqlite3OsSeek(pPager->fd, (pgno-1)*(i64)pPager->pageSize);
|
||||
|
Reference in New Issue
Block a user