/ Check-in [01ffdabb]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Always send the SQLITE_FCNTL_MMAP_LIMIT pragma to the VFS, even if the limit is zero and even if the VFS does not support xFetch().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1: 01ffdabbad30f1c157f2b33b1e85ee4d6c4632dd
User & Date: drh 2013-04-02 00:15:23
Context
2013-04-02
00:41
Remove an unreachable condition from pager.c. check-in: 3628e86b user: drh tags: experimental-mmap
00:15
Always send the SQLITE_FCNTL_MMAP_LIMIT pragma to the VFS, even if the limit is zero and even if the VFS does not support xFetch(). check-in: 01ffdabb user: drh tags: experimental-mmap
2013-04-01
22:42
Remove a debugging printf() accidently left in the previous check-in. check-in: 8198cdd8 user: drh tags: experimental-mmap
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
/*
** Invoke SQLITE_FCNTL_MMAP_LIMIT based on the current value of mxMmap.
*/
static void pagerFixMaplimit(Pager *pPager){
  sqlite3_file *fd = pPager->fd;
  if( isOpen(fd) ){
    pPager->bUseFetch = (fd->pMethods->iVersion>=3) && pPager->mxMmap>0;
    if( pPager->bUseFetch ){
      sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_LIMIT,
                               (void*)&pPager->mxMmap);
    }
  }
}

/*
** Change the maximum size of any memory mapping made of the database file.
*/
void sqlite3PagerSetMmapLimit(Pager *pPager, sqlite3_int64 mxMmap){







<
|
|
<







3356
3357
3358
3359
3360
3361
3362

3363
3364

3365
3366
3367
3368
3369
3370
3371
/*
** Invoke SQLITE_FCNTL_MMAP_LIMIT based on the current value of mxMmap.
*/
static void pagerFixMaplimit(Pager *pPager){
  sqlite3_file *fd = pPager->fd;
  if( isOpen(fd) ){
    pPager->bUseFetch = (fd->pMethods->iVersion>=3) && pPager->mxMmap>0;

    sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_LIMIT,
                             (void*)&pPager->mxMmap);

  }
}

/*
** Change the maximum size of any memory mapping made of the database file.
*/
void sqlite3PagerSetMmapLimit(Pager *pPager, sqlite3_int64 mxMmap){