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

Ensure that a checkpoint does not use an out-of-date mapping.

FossilOrigin-Name: a1040f0397d57855500926494c978623286ddc77
This commit is contained in:
dan
2013-04-01 16:56:41 +00:00
parent 0943f0bdc8
commit f55a4cf80c
3 changed files with 10 additions and 7 deletions

View File

@@ -2956,6 +2956,9 @@ int sqlite3WalCheckpoint(
/* Read the wal-index header. */
if( rc==SQLITE_OK ){
rc = walIndexReadHdr(pWal, &isChanged);
if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){
sqlite3OsUnfetch(pWal->pDbFd, 0, 0);
}
}
/* Copy data from the log to the database file. */