aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2013-04-01 16:56:41 +0000
committerdan <dan@noemail.net>2013-04-01 16:56:41 +0000
commitf55a4cf80c73937610e8b39d553f2c8aea02af8f (patch)
treeab2ae7226f6bc8c219c2382438da923c8045c944 /src
parent0943f0bdc870249bf1d2e8692de9fd2f296190a3 (diff)
downloadsqlite-f55a4cf80c73937610e8b39d553f2c8aea02af8f.tar.gz
sqlite-f55a4cf80c73937610e8b39d553f2c8aea02af8f.zip
Ensure that a checkpoint does not use an out-of-date mapping.
FossilOrigin-Name: a1040f0397d57855500926494c978623286ddc77
Diffstat (limited to 'src')
-rw-r--r--src/wal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wal.c b/src/wal.c
index abbd7032f..881f0a4c7 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -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. */