/ Check-in [708253be]
Login

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

Overview
Comment:Rename the sqlite3PagerAcquire() function to sqlite3PagerGet(). The former macro called sqlite3PagerGet() has been removed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 708253be34084b89987efe955c34557516171a3a
User & Date: drh 2015-11-04 20:22:37
Context
2015-11-04
22:31
Performance improvements in the getAndInitPage() routine of btree.c. check-in: 2aa50f6f user: drh tags: trunk
20:22
Rename the sqlite3PagerAcquire() function to sqlite3PagerGet(). The former macro called sqlite3PagerGet() has been removed. check-in: 708253be user: drh tags: trunk
16:34
In releasetest.tcl, run larger test first if --jobs is greater than 1. Run smaller tests cases first if --jobs is 1. check-in: 3fece5d0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/backup.c.

   289    289     ** page. For each iteration, variable iOff is set to the byte offset
   290    290     ** of the destination page.
   291    291     */
   292    292     for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){
   293    293       DbPage *pDestPg = 0;
   294    294       Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
   295    295       if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
   296         -    if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg))
          296  +    if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg, 0))
   297    297        && SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg))
   298    298       ){
   299    299         const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
   300    300         u8 *zDestData = sqlite3PagerGetData(pDestPg);
   301    301         u8 *zOut = &zDestData[iOff%nDestPgsz];
   302    302   
   303    303         /* Copy the data from the source page into the destination page.
................................................................................
   415    415       */
   416    416       nSrcPage = (int)sqlite3BtreeLastPage(p->pSrc);
   417    417       assert( nSrcPage>=0 );
   418    418       for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
   419    419         const Pgno iSrcPg = p->iNext;                 /* Source page number */
   420    420         if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
   421    421           DbPage *pSrcPg;                             /* Source page object */
   422         -        rc = sqlite3PagerAcquire(pSrcPager, iSrcPg, &pSrcPg,
   423         -                                 PAGER_GET_READONLY);
          422  +        rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg,PAGER_GET_READONLY);
   424    423           if( rc==SQLITE_OK ){
   425    424             rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
   426    425             sqlite3PagerUnref(pSrcPg);
   427    426           }
   428    427         }
   429    428         p->iNext++;
   430    429       }
................................................................................
   516    515             ** the database file in any way, knowing that if a power failure
   517    516             ** occurs, the original database will be reconstructed from the 
   518    517             ** journal file.  */
   519    518             sqlite3PagerPagecount(pDestPager, &nDstPage);
   520    519             for(iPg=nDestTruncate; rc==SQLITE_OK && iPg<=(Pgno)nDstPage; iPg++){
   521    520               if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){
   522    521                 DbPage *pPg;
   523         -              rc = sqlite3PagerGet(pDestPager, iPg, &pPg);
          522  +              rc = sqlite3PagerGet(pDestPager, iPg, &pPg, 0);
   524    523                 if( rc==SQLITE_OK ){
   525    524                   rc = sqlite3PagerWrite(pPg);
   526    525                   sqlite3PagerUnref(pPg);
   527    526                 }
   528    527               }
   529    528             }
   530    529             if( rc==SQLITE_OK ){
................................................................................
   536    535             for(
   537    536               iOff=PENDING_BYTE+pgszSrc; 
   538    537               rc==SQLITE_OK && iOff<iEnd; 
   539    538               iOff+=pgszSrc
   540    539             ){
   541    540               PgHdr *pSrcPg = 0;
   542    541               const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
   543         -            rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
          542  +            rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg, 0);
   544    543               if( rc==SQLITE_OK ){
   545    544                 u8 *zData = sqlite3PagerGetData(pSrcPg);
   546    545                 rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
   547    546               }
   548    547               sqlite3PagerUnref(pSrcPg);
   549    548             }
   550    549             if( rc==SQLITE_OK ){

Changes to src/btree.c.

   927    927   
   928    928     assert( pBt->autoVacuum );
   929    929     if( key==0 ){
   930    930       *pRC = SQLITE_CORRUPT_BKPT;
   931    931       return;
   932    932     }
   933    933     iPtrmap = PTRMAP_PAGENO(pBt, key);
   934         -  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
          934  +  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
   935    935     if( rc!=SQLITE_OK ){
   936    936       *pRC = rc;
   937    937       return;
   938    938     }
   939    939     offset = PTRMAP_PTROFFSET(iPtrmap, key);
   940    940     if( offset<0 ){
   941    941       *pRC = SQLITE_CORRUPT_BKPT;
................................................................................
   970    970     u8 *pPtrmap;       /* Pointer map page data */
   971    971     int offset;        /* Offset of entry in pointer map */
   972    972     int rc;
   973    973   
   974    974     assert( sqlite3_mutex_held(pBt->mutex) );
   975    975   
   976    976     iPtrmap = PTRMAP_PAGENO(pBt, key);
   977         -  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
          977  +  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
   978    978     if( rc!=0 ){
   979    979       return rc;
   980    980     }
   981    981     pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);
   982    982   
   983    983     offset = PTRMAP_PTROFFSET(iPtrmap, key);
   984    984     if( offset<0 ){
................................................................................
  1927   1927     int flags            /* PAGER_GET_NOCONTENT or PAGER_GET_READONLY */
  1928   1928   ){
  1929   1929     int rc;
  1930   1930     DbPage *pDbPage;
  1931   1931   
  1932   1932     assert( flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY );
  1933   1933     assert( sqlite3_mutex_held(pBt->mutex) );
  1934         -  rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);
         1934  +  rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);
  1935   1935     if( rc ) return rc;
  1936   1936     *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
  1937   1937     return SQLITE_OK;
  1938   1938   }
  1939   1939   
  1940   1940   /*
  1941   1941   ** Retrieve a page from the pager cache. If the requested page is not
................................................................................
  1992   1992     assert( pCur==0 || bReadOnly==pCur->curPagerFlags );
  1993   1993     assert( pCur==0 || pCur->iPage>0 );
  1994   1994   
  1995   1995     if( pgno>btreePagecount(pBt) ){
  1996   1996       rc = SQLITE_CORRUPT_BKPT;
  1997   1997       goto getAndInitPage_error;
  1998   1998     }
  1999         -  rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
         1999  +  rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
  2000   2000     if( rc ){
  2001   2001       goto getAndInitPage_error;
  2002   2002     }
  2003   2003     *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
  2004   2004     if( (*ppPage)->isInit==0 ){
  2005   2005       rc = btreeInitPage(*ppPage);
  2006   2006       if( rc!=SQLITE_OK ){
................................................................................
  4589   4589             nextPage = get4byte(aWrite);
  4590   4590             memcpy(aWrite, aSave, 4);
  4591   4591           }else
  4592   4592   #endif
  4593   4593   
  4594   4594           {
  4595   4595             DbPage *pDbPage;
  4596         -          rc = sqlite3PagerAcquire(pBt->pPager, nextPage, &pDbPage,
         4596  +          rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,
  4597   4597                 ((eOp&0x01)==0 ? PAGER_GET_READONLY : 0)
  4598   4598             );
  4599   4599             if( rc==SQLITE_OK ){
  4600   4600               aPayload = sqlite3PagerGetData(pDbPage);
  4601   4601               nextPage = get4byte(aPayload);
  4602   4602               rc = copyPayload(&aPayload[offset+4], pBuf, a, (eOp&0x01), pDbPage);
  4603   4603               sqlite3PagerUnref(pDbPage);
................................................................................
  8905   8905       if( iPage<1 ){
  8906   8906         checkAppendMsg(pCheck,
  8907   8907            "%d of %d pages missing from overflow list starting at %d",
  8908   8908             N+1, expected, iFirst);
  8909   8909         break;
  8910   8910       }
  8911   8911       if( checkRef(pCheck, iPage) ) break;
  8912         -    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
         8912  +    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){
  8913   8913         checkAppendMsg(pCheck, "failed to get page %d", iPage);
  8914   8914         break;
  8915   8915       }
  8916   8916       pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);
  8917   8917       if( isFreeList ){
  8918   8918         int n = get4byte(&pOvflData[4]);
  8919   8919   #ifndef SQLITE_OMIT_AUTOVACUUM

Changes to src/btreeInt.h.

   513    513     i64 nKey;                 /* Size of pKey, or last integer key */
   514    514     void *pKey;               /* Saved key that was cursor last known position */
   515    515     Pgno pgnoRoot;            /* The root page of this tree */
   516    516     int nOvflAlloc;           /* Allocated size of aOverflow[] array */
   517    517     int skipNext;    /* Prev() is noop if negative. Next() is noop if positive.
   518    518                      ** Error code if eState==CURSOR_FAULT */
   519    519     u8 curFlags;              /* zero or more BTCF_* flags defined below */
   520         -  u8 curPagerFlags;         /* Flags to send to sqlite3PagerAcquire() */
          520  +  u8 curPagerFlags;         /* Flags to send to sqlite3PagerGet() */
   521    521     u8 eState;                /* One of the CURSOR_XXX constants (see below) */
   522    522     u8 hints;                 /* As configured by CursorSetHints() */
   523    523     /* All fields above are zeroed when the cursor is allocated.  See
   524    524     ** sqlite3BtreeCursorZero().  Fields that follow must be manually
   525    525     ** initialized. */
   526    526     i8 iPage;                 /* Index of current page in apPage */
   527    527     u8 curIntKey;             /* Value of apPage[0]->intKey */

Changes to src/dbstat.c.

   382    382             pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
   383    383             if( pCell->aOvfl==0 ) return SQLITE_NOMEM;
   384    384             pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
   385    385             for(j=1; j<nOvfl; j++){
   386    386               int rc;
   387    387               u32 iPrev = pCell->aOvfl[j-1];
   388    388               DbPage *pPg = 0;
   389         -            rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPrev, &pPg);
          389  +            rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPrev, &pPg, 0);
   390    390               if( rc!=SQLITE_OK ){
   391    391                 assert( pPg==0 );
   392    392                 return rc;
   393    393               } 
   394    394               pCell->aOvfl[j] = sqlite3Get4byte(sqlite3PagerGetData(pPg));
   395    395               sqlite3PagerUnref(pPg);
   396    396             }
................................................................................
   450    450         int nPage;
   451    451         u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);
   452    452         sqlite3PagerPagecount(pPager, &nPage);
   453    453         if( nPage==0 ){
   454    454           pCsr->isEof = 1;
   455    455           return sqlite3_reset(pCsr->pStmt);
   456    456         }
   457         -      rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg);
          457  +      rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg, 0);
   458    458         pCsr->aPage[0].iPgno = iRoot;
   459    459         pCsr->aPage[0].iCell = 0;
   460    460         pCsr->aPage[0].zPath = z = sqlite3_mprintf("/");
   461    461         pCsr->iPage = 0;
   462    462         if( z==0 ) rc = SQLITE_NOMEM;
   463    463       }else{
   464    464         pCsr->isEof = 1;
................................................................................
   510    510       assert( p==&pCsr->aPage[pCsr->iPage-1] );
   511    511   
   512    512       if( p->iCell==p->nCell ){
   513    513         p[1].iPgno = p->iRightChildPg;
   514    514       }else{
   515    515         p[1].iPgno = p->aCell[p->iCell].iChildPg;
   516    516       }
   517         -    rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg);
          517  +    rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg, 0);
   518    518       p[1].iCell = 0;
   519    519       p[1].zPath = z = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell);
   520    520       p->iCell++;
   521    521       if( z==0 ) rc = SQLITE_NOMEM;
   522    522     }
   523    523   
   524    524   

Changes to src/pager.c.

  2329   2329       ** the data just read from the sub-journal. Mark the page as dirty 
  2330   2330       ** and if the pager requires a journal-sync, then mark the page as 
  2331   2331       ** requiring a journal-sync before it is written.
  2332   2332       */
  2333   2333       assert( isSavepnt );
  2334   2334       assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0 );
  2335   2335       pPager->doNotSpill |= SPILLFLAG_ROLLBACK;
  2336         -    rc = sqlite3PagerAcquire(pPager, pgno, &pPg, 1);
         2336  +    rc = sqlite3PagerGet(pPager, pgno, &pPg, 1);
  2337   2337       assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0 );
  2338   2338       pPager->doNotSpill &= ~SPILLFLAG_ROLLBACK;
  2339   2339       if( rc!=SQLITE_OK ) return rc;
  2340   2340       pPg->flags &= ~PGHDR_NEED_READ;
  2341   2341       sqlite3PcacheMakeDirty(pPg);
  2342   2342     }
  2343   2343     if( pPg ){
................................................................................
  4965   4965     }
  4966   4966   
  4967   4967     return rc;
  4968   4968   }
  4969   4969   
  4970   4970   /*
  4971   4971   ** This function is called to obtain a shared lock on the database file.
  4972         -** It is illegal to call sqlite3PagerAcquire() until after this function
         4972  +** It is illegal to call sqlite3PagerGet() until after this function
  4973   4973   ** has been successfully called. If a shared-lock is already held when
  4974   4974   ** this function is called, it is a no-op.
  4975   4975   **
  4976   4976   ** The following operations are also performed by this function.
  4977   4977   **
  4978   4978   **   1) If the pager is currently in PAGER_OPEN state (no lock held
  4979   4979   **      on the database file), then an attempt is made to obtain a
................................................................................
  5268   5268   ** to find a page in the in-memory cache first.  If the page is not already
  5269   5269   ** in memory, this routine goes to disk to read it in whereas Lookup()
  5270   5270   ** just returns 0.  This routine acquires a read-lock the first time it
  5271   5271   ** has to go to disk, and could also playback an old journal if necessary.
  5272   5272   ** Since Lookup() never goes to disk, it never has to deal with locks
  5273   5273   ** or journal files.
  5274   5274   */
  5275         -int sqlite3PagerAcquire(
         5275  +int sqlite3PagerGet(
  5276   5276     Pager *pPager,      /* The pager open on the database file */
  5277   5277     Pgno pgno,          /* Page number to fetch */
  5278   5278     DbPage **ppPage,    /* Write a pointer to the page here */
  5279   5279     int flags           /* PAGER_GET_XXX flags */
  5280   5280   ){
  5281   5281     int rc = SQLITE_OK;
  5282   5282     PgHdr *pPg = 0;
................................................................................
  5854   5854     assert((pg1+nPage)>pPg->pgno);
  5855   5855   
  5856   5856     for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){
  5857   5857       Pgno pg = pg1+ii;
  5858   5858       PgHdr *pPage;
  5859   5859       if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){
  5860   5860         if( pg!=PAGER_MJ_PGNO(pPager) ){
  5861         -        rc = sqlite3PagerGet(pPager, pg, &pPage);
         5861  +        rc = sqlite3PagerGet(pPager, pg, &pPage, 0);
  5862   5862           if( rc==SQLITE_OK ){
  5863   5863             rc = pager_write(pPage);
  5864   5864             if( pPage->flags&PGHDR_NEED_SYNC ){
  5865   5865               needSync = 1;
  5866   5866             }
  5867   5867             sqlite3PagerUnrefNotNull(pPage);
  5868   5868           }
................................................................................
  6014   6014   
  6015   6015     if( !pPager->changeCountDone && ALWAYS(pPager->dbSize>0) ){
  6016   6016       PgHdr *pPgHdr;                /* Reference to page 1 */
  6017   6017   
  6018   6018       assert( !pPager->tempFile && isOpen(pPager->fd) );
  6019   6019   
  6020   6020       /* Open page 1 of the file for writing. */
  6021         -    rc = sqlite3PagerGet(pPager, 1, &pPgHdr);
         6021  +    rc = sqlite3PagerGet(pPager, 1, &pPgHdr, 0);
  6022   6022       assert( pPgHdr==0 || rc==SQLITE_OK );
  6023   6023   
  6024   6024       /* If page one was fetched successfully, and this function is not
  6025   6025       ** operating in direct-mode, make page 1 writable.  When not in 
  6026   6026       ** direct mode, page 1 is always held in cache and hence the PagerGet()
  6027   6027       ** above is always successful - hence the ALWAYS on rc==SQLITE_OK.
  6028   6028       */
................................................................................
  6169   6169     }else{
  6170   6170       if( pagerUseWal(pPager) ){
  6171   6171         PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
  6172   6172         PgHdr *pPageOne = 0;
  6173   6173         if( pList==0 ){
  6174   6174           /* Must have at least one page for the WAL commit flag.
  6175   6175           ** Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 */
  6176         -        rc = sqlite3PagerGet(pPager, 1, &pPageOne);
         6176  +        rc = sqlite3PagerGet(pPager, 1, &pPageOne, 0);
  6177   6177           pList = pPageOne;
  6178   6178           pList->pDirty = 0;
  6179   6179         }
  6180   6180         assert( rc==SQLITE_OK );
  6181   6181         if( ALWAYS(pList) ){
  6182   6182           rc = pagerWalFrames(pPager, pList, pPager->dbSize, 1);
  6183   6183         }
................................................................................
  6874   6874       ** to a malloc() or IO failure), clear the bit in the pInJournal[]
  6875   6875       ** array. Otherwise, if the page is loaded and written again in
  6876   6876       ** this transaction, it may be written to the database file before
  6877   6877       ** it is synced into the journal file. This way, it may end up in
  6878   6878       ** the journal file twice, but that is not a problem.
  6879   6879       */
  6880   6880       PgHdr *pPgHdr;
  6881         -    rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr);
         6881  +    rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr, 0);
  6882   6882       if( rc!=SQLITE_OK ){
  6883   6883         if( needSyncPgno<=pPager->dbOrigSize ){
  6884   6884           assert( pPager->pTmpSpace!=0 );
  6885   6885           sqlite3BitvecClear(pPager->pInJournal, needSyncPgno, pPager->pTmpSpace);
  6886   6886         }
  6887   6887         return rc;
  6888   6888       }

Changes to src/pager.h.

    75     75   #define PAGER_JOURNALMODE_PERSIST     1   /* Commit by zeroing journal header */
    76     76   #define PAGER_JOURNALMODE_OFF         2   /* Journal omitted.  */
    77     77   #define PAGER_JOURNALMODE_TRUNCATE    3   /* Commit by truncating journal */
    78     78   #define PAGER_JOURNALMODE_MEMORY      4   /* In-memory journal file */
    79     79   #define PAGER_JOURNALMODE_WAL         5   /* Use write-ahead logging */
    80     80   
    81     81   /*
    82         -** Flags that make up the mask passed to sqlite3PagerAcquire().
           82  +** Flags that make up the mask passed to sqlite3PagerGet().
    83     83   */
    84     84   #define PAGER_GET_NOCONTENT     0x01  /* Do not load data from disk */
    85     85   #define PAGER_GET_READONLY      0x02  /* Read-only page is acceptable */
    86     86   
    87     87   /*
    88     88   ** Flags for sqlite3PagerSetFlags()
    89     89   */
................................................................................
   131    131   int sqlite3PagerGetJournalMode(Pager*);
   132    132   int sqlite3PagerOkToChangeJournalMode(Pager*);
   133    133   i64 sqlite3PagerJournalSizeLimit(Pager *, i64);
   134    134   sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
   135    135   int sqlite3PagerFlush(Pager*);
   136    136   
   137    137   /* Functions used to obtain and release page references. */ 
   138         -int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
   139         -#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)
          138  +int sqlite3PagerGet(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
   140    139   DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
   141    140   void sqlite3PagerRef(DbPage*);
   142    141   void sqlite3PagerUnref(DbPage*);
   143    142   void sqlite3PagerUnrefNotNull(DbPage*);
   144    143   
   145    144   /* Operations on page references. */
   146    145   int sqlite3PagerWrite(DbPage*);

Changes to src/test2.c.

   318    318          " ID PGNO\"", 0);
   319    319       return TCL_ERROR;
   320    320     }
   321    321     pPager = sqlite3TestTextToPtr(argv[1]);
   322    322     if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR;
   323    323     rc = sqlite3PagerSharedLock(pPager);
   324    324     if( rc==SQLITE_OK ){
   325         -    rc = sqlite3PagerGet(pPager, pgno, &pPage);
          325  +    rc = sqlite3PagerGet(pPager, pgno, &pPage, 0);
   326    326     }
   327    327     if( rc!=SQLITE_OK ){
   328    328       Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
   329    329       return TCL_ERROR;
   330    330     }
   331    331     sqlite3_snprintf(sizeof(zBuf),zBuf,"%p",pPage);
   332    332     Tcl_AppendResult(interp, zBuf, 0);