1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a bug in checkpoint introduced by [181ceb32ea].

FossilOrigin-Name: b499dbc88a67b4200b5f527be88be4ac90f7043f
This commit is contained in:
dan
2010-05-31 11:39:53 +00:00
parent d54ff60bf4
commit 0cc5b2b6c6
3 changed files with 8 additions and 8 deletions

View File

@@ -1352,7 +1352,7 @@ static int walCheckpoint(
for(i=1; i<WAL_NREADER; i++){
u32 y = pInfo->aReadMark[i];
if( y>0 && (mxSafeFrame==0 || mxSafeFrame>=y) ){
if( y<pWal->hdr.mxFrame
if( y<=pWal->hdr.mxFrame
&& (rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1))==SQLITE_OK
){
pInfo->aReadMark[i] = 0;