mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
In lsm, attempt to unmap the database file before truncating it when
disconnecting. A mapped file may not be truncated on win32. FossilOrigin-Name: 39069941e98605bc8c7c736819781761760ee2b83363471ceb6f19e5eb06b13a
This commit is contained in:
@ -1150,6 +1150,17 @@ static void fsGrowMapping(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** If it is mapped, unmap the database file.
|
||||
*/
|
||||
int lsmFsUnmap(FileSystem *pFS){
|
||||
int rc = LSM_OK;
|
||||
if( pFS ){
|
||||
rc = lsmEnvRemap(pFS->pEnv, pFS->fdDb, -1, &pFS->pMap, &pFS->nMap);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** fsync() the database file.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user