1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Change the mmap_limit pragma to report the new limit, or to report the

existing limit if called with no arguments.  Report the default mmap_limit
as part of PRAGMA compile_options.  Set the default mmmap_limit to 0 for
all systems other than linux, mac, windows, and solaris.

FossilOrigin-Name: 2d9f1327fe79e40435ce1e2594d7cd9a5aea0ef2
This commit is contained in:
drh
2013-04-03 13:09:18 +00:00
parent 6c96946475
commit 34f7490311
10 changed files with 43 additions and 33 deletions

View File

@@ -3710,7 +3710,9 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
return SQLITE_OK;
}
case SQLITE_FCNTL_MMAP_LIMIT: {
pFile->mmapLimit = *(i64*)pArg;
i64 newLimit = *(i64*)pArg;
*(i64*)pArg = pFile->mmapLimit;
if( newLimit>=0 ) pFile->mmapLimit = newLimit;
return SQLITE_OK;
}
#ifdef SQLITE_DEBUG