1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Changes to support building with SQLITE_OMIT_WAL.

FossilOrigin-Name: d1ed743b6ed07ad0ee7d466932c5a83caa9489ee
This commit is contained in:
shaneh
2010-08-24 18:35:12 +00:00
parent 357b5f97be
commit 9091f775a8
6 changed files with 101 additions and 92 deletions

View File

@@ -2977,6 +2977,7 @@ static int pagerBeginReadTransaction(Pager *pPager){
return rc;
}
#endif
/*
** This function is called as part of the transition from PAGER_OPEN
@@ -2998,7 +2999,11 @@ static int pagerPagecount(Pager *pPager, Pgno *pnPage){
*/
assert( pPager->eState==PAGER_OPEN );
assert( pPager->eLock>=SHARED_LOCK || pPager->noReadlock );
#ifndef SQLITE_OMIT_WAL
nPage = sqlite3WalDbsize(pPager->pWal);
#else
nPage = 0;
#endif
/* If the database size was not available from the WAL sub-system,
** determine it based on the size of the database file. If the size
@@ -3033,7 +3038,7 @@ static int pagerPagecount(Pager *pPager, Pgno *pnPage){
return SQLITE_OK;
}
#ifndef SQLITE_OMIT_WAL
/*
** Check if the *-wal file that corresponds to the database opened by pPager
** exists if the database is not empy, or verify that the *-wal file does
@@ -4778,7 +4783,9 @@ int sqlite3PagerSharedLock(Pager *pPager){
** mode. Otherwise, the following function call is a no-op.
*/
rc = pagerOpenWalIfPresent(pPager);
#ifndef SQLITE_OMIT_WAL
assert( pPager->pWal==0 || rc==SQLITE_OK );
#endif
}
if( pagerUseWal(pPager) ){