aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c2
-rw-r--r--src/pager.c1
-rw-r--r--src/pager.h1
3 files changed, 2 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 334719200..d86581057 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1807,6 +1807,7 @@ end_unlock:
** the requested locking level, this routine is a no-op.
*/
static int unixUnlock(sqlite3_file *id, int eFileLock){
+ assert( eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0 );
return posixUnlock(id, eFileLock, 0);
}
@@ -4531,7 +4532,6 @@ static int unixMapfile(unixFile *pFd, i64 nByte){
}
if( nMap!=pFd->mmapSize ){
- void *pNew;
unixUnmapfile(pFd);
if( nMap>0 ){
diff --git a/src/pager.c b/src/pager.c
index 7e00e1431..d6e6b5b44 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -3870,6 +3870,7 @@ static int pagerAcquireMapPage(
}else{
*ppPage = p = (PgHdr *)sqlite3MallocZero(sizeof(PgHdr) + pPager->nExtra);
if( p==0 ){
+ sqlite3OsUnfetch(pPager->fd, pData);
return SQLITE_NOMEM;
}
p->pExtra = (void *)&p[1];
diff --git a/src/pager.h b/src/pager.h
index 066d1f11d..81ab30c11 100644
--- a/src/pager.h
+++ b/src/pager.h
@@ -174,7 +174,6 @@ int sqlite3SectorSize(sqlite3_file *);
/* Functions used to truncate the database file. */
void sqlite3PagerTruncateImage(Pager*,Pgno);
-int sqlite3PagerSetFilesize(Pager *, i64);
#if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL)
void *sqlite3PagerCodec(DbPage *);