1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Rename the sqlite3PagerAcquire() function to sqlite3PagerGet(). The former

macro called sqlite3PagerGet() has been removed.

FossilOrigin-Name: 708253be34084b89987efe955c34557516171a3a
This commit is contained in:
drh
2015-11-04 20:22:37 +00:00
parent 71258abf0d
commit 9584f58cc2
9 changed files with 37 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
C In\sreleasetest.tcl,\srun\slarger\stest\sfirst\sif\s--jobs\sis\sgreater\sthan\s1.\s\sRun\nsmaller\stests\scases\sfirst\sif\s--jobs\sis\s1. C Rename\sthe\ssqlite3PagerAcquire()\sfunction\sto\ssqlite3PagerGet().\s\sThe\sformer\nmacro\scalled\ssqlite3PagerGet()\shas\sbeen\sremoved.
D 2015-11-04T16:34:58.015 D 2015-11-04T20:22:37.219
F Makefile.in 3a705bb4bd12e194212ddbdbf068310d17153cdb F Makefile.in 3a705bb4bd12e194212ddbdbf068310d17153cdb
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 702d3e98f3afc6587a78481257f3c4c900efc3a4 F Makefile.msc 702d3e98f3afc6587a78481257f3c4c900efc3a4
@@ -279,18 +279,18 @@ F src/alter.c 9d649e46c780166e416fb11dbd23f8d49aab8267
F src/analyze.c 4c308880cf53c558070cb8513bdff4ffb1a38a77 F src/analyze.c 4c308880cf53c558070cb8513bdff4ffb1a38a77
F src/attach.c e944d0052b577703b9b83aac1638452ff42a8395 F src/attach.c e944d0052b577703b9b83aac1638452ff42a8395
F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240 F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
F src/backup.c c3a9c4209439b806c44cf30daf466955727bf46c F src/backup.c 2869a76c03eb393ee795416e2387005553df72bc
F src/bitvec.c d1f21d7d91690747881f03940584f4cc548c9d3d F src/bitvec.c d1f21d7d91690747881f03940584f4cc548c9d3d
F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
F src/btree.c 77343aac89c50bb5e06cbca3ace8c057c14de57c F src/btree.c 692ca3e69ade4e86844899dd5f85b2220daf3d76
F src/btree.h b512723e4f27d7ba16b4b985cdecdb82c0f6d0c0 F src/btree.h b512723e4f27d7ba16b4b985cdecdb82c0f6d0c0
F src/btreeInt.h 8177c9ab90d772d6d2c6c517e05bed774b7c92c0 F src/btreeInt.h 3ab435ed27adea54d040584b0bcc488ee7db1e38
F src/build.c ca574d33ffb1763cfd2979383f4d507095bfbe19 F src/build.c ca574d33ffb1763cfd2979383f4d507095bfbe19
F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0
F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f
F src/ctime.c 509ef9c64d1321f42448f111da86400b1799218a F src/ctime.c 509ef9c64d1321f42448f111da86400b1799218a
F src/date.c fb1c99172017dcc8e237339132c91a21a0788584 F src/date.c fb1c99172017dcc8e237339132c91a21a0788584
F src/dbstat.c e637e7a7ff40ef32132a418c6fdf1cfb63aa27c7 F src/dbstat.c ffd63fc8ba7541476ced189b95e95d7f2bc63f78
F src/delete.c c4c6fb9da78b946fcba2a6aac5b24bc5c15e752a F src/delete.c c4c6fb9da78b946fcba2a6aac5b24bc5c15e752a
F src/expr.c 0080c0f12806eca91e75a23a121a68918e9da357 F src/expr.c 0080c0f12806eca91e75a23a121a68918e9da357
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
@@ -327,8 +327,8 @@ F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
F src/os_unix.c cf72e06e15839ebe7121e01d3eebf256c039b0ca F src/os_unix.c cf72e06e15839ebe7121e01d3eebf256c039b0ca
F src/os_win.c 1716291e5ec2dbfc5a1fe0b32182030f1f7d8acf F src/os_win.c 1716291e5ec2dbfc5a1fe0b32182030f1f7d8acf
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
F src/pager.c 9c1eec0d88133484b165fa0b5284a411c24b964c F src/pager.c ed5cff11793b6a4146582aabb29ed8613a6cf89e
F src/pager.h 1c4fa826c330040c5659a384446c7cc6e8e4200c F src/pager.h 7fc069c07f3120ee466ff3d48a9d376974ebffa7
F src/parse.y 11078cd8e3af00f030505b6a86a06a4536cfdeaa F src/parse.y 11078cd8e3af00f030505b6a86a06a4536cfdeaa
F src/pcache.c 24be750c79272e0ca7b6e007bc94999700f3e5ef F src/pcache.c 24be750c79272e0ca7b6e007bc94999700f3e5ef
F src/pcache.h 9968603796240cdf83da7e7bef76edf90619cea9 F src/pcache.h 9968603796240cdf83da7e7bef76edf90619cea9
@@ -351,7 +351,7 @@ F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba
F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e
F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649 F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649
F src/test1.c 9ac5cbfe3c859ab7518edc5109a2959d6bf7b059 F src/test1.c 9ac5cbfe3c859ab7518edc5109a2959d6bf7b059
F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d F src/test2.c 5586f43fcd9a1be0830793cf9d354082c261b25b
F src/test3.c a8887dabbbee3059af338f20d290084a63ed1b0f F src/test3.c a8887dabbbee3059af338f20d290084a63ed1b0f
F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e
F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1 F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1
@@ -1398,7 +1398,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 4f16e9686d827311d069ac5856771db23bd610ff P 3fece5d02a8790701d8f0af18db4b4db33986369
R 98f8295aa06282e70a39acdf3a942e7d R ed171729fbc3a46f9021f6d576752c27
U drh U drh
Z 5331364b3b6f9338e5229c347e8468cf Z bcdee87febad0b65031e24eb55987e22

View File

@@ -1 +1 @@
3fece5d02a8790701d8f0af18db4b4db33986369 708253be34084b89987efe955c34557516171a3a

View File

@@ -293,7 +293,7 @@ static int backupOnePage(
DbPage *pDestPg = 0; DbPage *pDestPg = 0;
Pgno iDest = (Pgno)(iOff/nDestPgsz)+1; Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue; if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg)) if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg, 0))
&& SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg)) && SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg))
){ ){
const u8 *zIn = &zSrcData[iOff%nSrcPgsz]; const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
@@ -419,8 +419,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
const Pgno iSrcPg = p->iNext; /* Source page number */ const Pgno iSrcPg = p->iNext; /* Source page number */
if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){ if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
DbPage *pSrcPg; /* Source page object */ DbPage *pSrcPg; /* Source page object */
rc = sqlite3PagerAcquire(pSrcPager, iSrcPg, &pSrcPg, rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg,PAGER_GET_READONLY);
PAGER_GET_READONLY);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0); rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
sqlite3PagerUnref(pSrcPg); sqlite3PagerUnref(pSrcPg);
@@ -520,7 +519,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
for(iPg=nDestTruncate; rc==SQLITE_OK && iPg<=(Pgno)nDstPage; iPg++){ for(iPg=nDestTruncate; rc==SQLITE_OK && iPg<=(Pgno)nDstPage; iPg++){
if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){ if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){
DbPage *pPg; DbPage *pPg;
rc = sqlite3PagerGet(pDestPager, iPg, &pPg); rc = sqlite3PagerGet(pDestPager, iPg, &pPg, 0);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite(pPg); rc = sqlite3PagerWrite(pPg);
sqlite3PagerUnref(pPg); sqlite3PagerUnref(pPg);
@@ -540,7 +539,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
){ ){
PgHdr *pSrcPg = 0; PgHdr *pSrcPg = 0;
const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1); const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg); rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg, 0);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
u8 *zData = sqlite3PagerGetData(pSrcPg); u8 *zData = sqlite3PagerGetData(pSrcPg);
rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff); rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);

View File

@@ -931,7 +931,7 @@ static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
return; return;
} }
iPtrmap = PTRMAP_PAGENO(pBt, key); iPtrmap = PTRMAP_PAGENO(pBt, key);
rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage); rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
if( rc!=SQLITE_OK ){ if( rc!=SQLITE_OK ){
*pRC = rc; *pRC = rc;
return; return;
@@ -974,7 +974,7 @@ static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
assert( sqlite3_mutex_held(pBt->mutex) ); assert( sqlite3_mutex_held(pBt->mutex) );
iPtrmap = PTRMAP_PAGENO(pBt, key); iPtrmap = PTRMAP_PAGENO(pBt, key);
rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage); rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
if( rc!=0 ){ if( rc!=0 ){
return rc; return rc;
} }
@@ -1931,7 +1931,7 @@ static int btreeGetPage(
assert( flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY ); assert( flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY );
assert( sqlite3_mutex_held(pBt->mutex) ); assert( sqlite3_mutex_held(pBt->mutex) );
rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, flags); rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);
if( rc ) return rc; if( rc ) return rc;
*ppPage = btreePageFromDbPage(pDbPage, pgno, pBt); *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
return SQLITE_OK; return SQLITE_OK;
@@ -1996,7 +1996,7 @@ static int getAndInitPage(
rc = SQLITE_CORRUPT_BKPT; rc = SQLITE_CORRUPT_BKPT;
goto getAndInitPage_error; goto getAndInitPage_error;
} }
rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly); rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
if( rc ){ if( rc ){
goto getAndInitPage_error; goto getAndInitPage_error;
} }
@@ -4593,7 +4593,7 @@ static int accessPayload(
{ {
DbPage *pDbPage; DbPage *pDbPage;
rc = sqlite3PagerAcquire(pBt->pPager, nextPage, &pDbPage, rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,
((eOp&0x01)==0 ? PAGER_GET_READONLY : 0) ((eOp&0x01)==0 ? PAGER_GET_READONLY : 0)
); );
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
@@ -8909,7 +8909,7 @@ static void checkList(
break; break;
} }
if( checkRef(pCheck, iPage) ) break; if( checkRef(pCheck, iPage) ) break;
if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){ if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){
checkAppendMsg(pCheck, "failed to get page %d", iPage); checkAppendMsg(pCheck, "failed to get page %d", iPage);
break; break;
} }

View File

@@ -517,7 +517,7 @@ struct BtCursor {
int skipNext; /* Prev() is noop if negative. Next() is noop if positive. int skipNext; /* Prev() is noop if negative. Next() is noop if positive.
** Error code if eState==CURSOR_FAULT */ ** Error code if eState==CURSOR_FAULT */
u8 curFlags; /* zero or more BTCF_* flags defined below */ u8 curFlags; /* zero or more BTCF_* flags defined below */
u8 curPagerFlags; /* Flags to send to sqlite3PagerAcquire() */ u8 curPagerFlags; /* Flags to send to sqlite3PagerGet() */
u8 eState; /* One of the CURSOR_XXX constants (see below) */ u8 eState; /* One of the CURSOR_XXX constants (see below) */
u8 hints; /* As configured by CursorSetHints() */ u8 hints; /* As configured by CursorSetHints() */
/* All fields above are zeroed when the cursor is allocated. See /* All fields above are zeroed when the cursor is allocated. See

View File

@@ -386,7 +386,7 @@ static int statDecodePage(Btree *pBt, StatPage *p){
int rc; int rc;
u32 iPrev = pCell->aOvfl[j-1]; u32 iPrev = pCell->aOvfl[j-1];
DbPage *pPg = 0; DbPage *pPg = 0;
rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPrev, &pPg); rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPrev, &pPg, 0);
if( rc!=SQLITE_OK ){ if( rc!=SQLITE_OK ){
assert( pPg==0 ); assert( pPg==0 );
return rc; return rc;
@@ -454,7 +454,7 @@ statNextRestart:
pCsr->isEof = 1; pCsr->isEof = 1;
return sqlite3_reset(pCsr->pStmt); return sqlite3_reset(pCsr->pStmt);
} }
rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg); rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg, 0);
pCsr->aPage[0].iPgno = iRoot; pCsr->aPage[0].iPgno = iRoot;
pCsr->aPage[0].iCell = 0; pCsr->aPage[0].iCell = 0;
pCsr->aPage[0].zPath = z = sqlite3_mprintf("/"); pCsr->aPage[0].zPath = z = sqlite3_mprintf("/");
@@ -514,7 +514,7 @@ statNextRestart:
}else{ }else{
p[1].iPgno = p->aCell[p->iCell].iChildPg; p[1].iPgno = p->aCell[p->iCell].iChildPg;
} }
rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg); rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg, 0);
p[1].iCell = 0; p[1].iCell = 0;
p[1].zPath = z = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell); p[1].zPath = z = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell);
p->iCell++; p->iCell++;

View File

@@ -2333,7 +2333,7 @@ static int pager_playback_one_page(
assert( isSavepnt ); assert( isSavepnt );
assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0 ); assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0 );
pPager->doNotSpill |= SPILLFLAG_ROLLBACK; pPager->doNotSpill |= SPILLFLAG_ROLLBACK;
rc = sqlite3PagerAcquire(pPager, pgno, &pPg, 1); rc = sqlite3PagerGet(pPager, pgno, &pPg, 1);
assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0 ); assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0 );
pPager->doNotSpill &= ~SPILLFLAG_ROLLBACK; pPager->doNotSpill &= ~SPILLFLAG_ROLLBACK;
if( rc!=SQLITE_OK ) return rc; if( rc!=SQLITE_OK ) return rc;
@@ -4969,7 +4969,7 @@ static int hasHotJournal(Pager *pPager, int *pExists){
/* /*
** This function is called to obtain a shared lock on the database file. ** This function is called to obtain a shared lock on the database file.
** It is illegal to call sqlite3PagerAcquire() until after this function ** It is illegal to call sqlite3PagerGet() until after this function
** has been successfully called. If a shared-lock is already held when ** has been successfully called. If a shared-lock is already held when
** this function is called, it is a no-op. ** this function is called, it is a no-op.
** **
@@ -5272,7 +5272,7 @@ static void pagerUnlockIfUnused(Pager *pPager){
** Since Lookup() never goes to disk, it never has to deal with locks ** Since Lookup() never goes to disk, it never has to deal with locks
** or journal files. ** or journal files.
*/ */
int sqlite3PagerAcquire( int sqlite3PagerGet(
Pager *pPager, /* The pager open on the database file */ Pager *pPager, /* The pager open on the database file */
Pgno pgno, /* Page number to fetch */ Pgno pgno, /* Page number to fetch */
DbPage **ppPage, /* Write a pointer to the page here */ DbPage **ppPage, /* Write a pointer to the page here */
@@ -5858,7 +5858,7 @@ static SQLITE_NOINLINE int pagerWriteLargeSector(PgHdr *pPg){
PgHdr *pPage; PgHdr *pPage;
if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){ if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){
if( pg!=PAGER_MJ_PGNO(pPager) ){ if( pg!=PAGER_MJ_PGNO(pPager) ){
rc = sqlite3PagerGet(pPager, pg, &pPage); rc = sqlite3PagerGet(pPager, pg, &pPage, 0);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
rc = pager_write(pPage); rc = pager_write(pPage);
if( pPage->flags&PGHDR_NEED_SYNC ){ if( pPage->flags&PGHDR_NEED_SYNC ){
@@ -6018,7 +6018,7 @@ static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
assert( !pPager->tempFile && isOpen(pPager->fd) ); assert( !pPager->tempFile && isOpen(pPager->fd) );
/* Open page 1 of the file for writing. */ /* Open page 1 of the file for writing. */
rc = sqlite3PagerGet(pPager, 1, &pPgHdr); rc = sqlite3PagerGet(pPager, 1, &pPgHdr, 0);
assert( pPgHdr==0 || rc==SQLITE_OK ); assert( pPgHdr==0 || rc==SQLITE_OK );
/* If page one was fetched successfully, and this function is not /* If page one was fetched successfully, and this function is not
@@ -6173,7 +6173,7 @@ int sqlite3PagerCommitPhaseOne(
if( pList==0 ){ if( pList==0 ){
/* Must have at least one page for the WAL commit flag. /* Must have at least one page for the WAL commit flag.
** Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 */ ** Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 */
rc = sqlite3PagerGet(pPager, 1, &pPageOne); rc = sqlite3PagerGet(pPager, 1, &pPageOne, 0);
pList = pPageOne; pList = pPageOne;
pList->pDirty = 0; pList->pDirty = 0;
} }
@@ -6878,7 +6878,7 @@ int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
** the journal file twice, but that is not a problem. ** the journal file twice, but that is not a problem.
*/ */
PgHdr *pPgHdr; PgHdr *pPgHdr;
rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr); rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr, 0);
if( rc!=SQLITE_OK ){ if( rc!=SQLITE_OK ){
if( needSyncPgno<=pPager->dbOrigSize ){ if( needSyncPgno<=pPager->dbOrigSize ){
assert( pPager->pTmpSpace!=0 ); assert( pPager->pTmpSpace!=0 );

View File

@@ -79,7 +79,7 @@ typedef struct PgHdr DbPage;
#define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */ #define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */
/* /*
** Flags that make up the mask passed to sqlite3PagerAcquire(). ** Flags that make up the mask passed to sqlite3PagerGet().
*/ */
#define PAGER_GET_NOCONTENT 0x01 /* Do not load data from disk */ #define PAGER_GET_NOCONTENT 0x01 /* Do not load data from disk */
#define PAGER_GET_READONLY 0x02 /* Read-only page is acceptable */ #define PAGER_GET_READONLY 0x02 /* Read-only page is acceptable */
@@ -135,8 +135,7 @@ sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
int sqlite3PagerFlush(Pager*); int sqlite3PagerFlush(Pager*);
/* Functions used to obtain and release page references. */ /* Functions used to obtain and release page references. */
int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); int sqlite3PagerGet(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)
DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
void sqlite3PagerRef(DbPage*); void sqlite3PagerRef(DbPage*);
void sqlite3PagerUnref(DbPage*); void sqlite3PagerUnref(DbPage*);

View File

@@ -322,7 +322,7 @@ static int page_get(
if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR; if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR;
rc = sqlite3PagerSharedLock(pPager); rc = sqlite3PagerSharedLock(pPager);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
rc = sqlite3PagerGet(pPager, pgno, &pPage); rc = sqlite3PagerGet(pPager, pgno, &pPage, 0);
} }
if( rc!=SQLITE_OK ){ if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0); Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);