SQLite

Changes On Branch mmap-wal-bigtrans
Login

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

Changes In Branch mmap-wal-bigtrans Excluding Merge-Ins

This is equivalent to a diff from e596a6b6 to 3a82c8e6

2015-08-07
20:06
Add a specially formatted comment to shell.c to make it easier for scripts to edit. No code changes. (check-in: 6d47b35a user: dan tags: trunk)
09:42
Within a write-transaction on a wal database in mmap mode, check the page-cache for an entry before the wal file. This can be faster if the wal file is very large. (Leaf check-in: 3a82c8e6 user: dan tags: mmap-wal-bigtrans)
2015-08-06
12:54
increase the version number to 3.8.12 (check-in: e596a6b6 user: drh tags: trunk)
03:09
Fix duplicate test numbering in the FTS5 matchinfo tests. (check-in: 483ebe89 user: mistachkin tags: trunk)

Changes to src/pager.c.

5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280









5281
5282
5283


5284
5285
5286
5287



5288
5289

5290
5291

5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303








5304
5305
5306
5307
5308
5309
5310
5270
5271
5272
5273
5274
5275
5276




5277
5278
5279
5280
5281
5282
5283
5284
5285
5286


5287
5288




5289
5290
5291


5292


5293
5294











5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309







-
-
-
-
+
+
+
+
+
+
+
+
+

-
-
+
+
-
-
-
-
+
+
+
-
-
+
-
-
+

-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+







  pPager->hasBeenUsed = 1;

  /* If the pager is in the error state, return an error immediately. 
  ** Otherwise, request the page from the PCache layer. */
  if( pPager->errCode!=SQLITE_OK ){
    rc = pPager->errCode;
  }else{
    if( bMmapOk && pagerUseWal(pPager) ){
      rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
      if( rc!=SQLITE_OK ) goto pager_acquire_err;
    }
    if( bMmapOk ){
      if( pPager->eState>PAGER_READER ){
        pPg = sqlite3PagerLookup(pPager, pgno);
      }

      if( pPg==0 && pagerUseWal(pPager) ){
        rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
        if( rc!=SQLITE_OK ) goto pager_acquire_err;
      }

    if( bMmapOk && iFrame==0 ){
      void *pData = 0;
      if( pPg==0 && iFrame==0 ){
        void *pData = 0;

      rc = sqlite3OsFetch(pPager->fd, 
          (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData
      );
        rc = sqlite3OsFetch(pPager->fd, 
            (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData
        );

      if( rc==SQLITE_OK && pData ){
        if( rc==SQLITE_OK && pData ){
        if( pPager->eState>PAGER_READER ){
          pPg = sqlite3PagerLookup(pPager, pgno);
          rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);
        }
        if( pPg==0 ){
          rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);
        }else{
          sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1)*pPager->pageSize, pData);
        }
        if( pPg ){
          assert( rc==SQLITE_OK );
          *ppPage = pPg;
          return SQLITE_OK;
        }
      }
      }

      if( pPg ){
        assert( rc==SQLITE_OK );
        *ppPage = pPg;
        return SQLITE_OK;
      }

      if( rc!=SQLITE_OK ){
        goto pager_acquire_err;
      }
    }

    {
      sqlite3_pcache_page *pBase;