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

Add the sqlite3PagerWalFramesize() function to pager.c. This is used by zipvfs.

FossilOrigin-Name: 786e24dc56504d1958db0618e645610f2600a087
This commit is contained in:
dan
2012-02-23 15:35:49 +00:00
parent 49dc66df0f
commit b3bdc72ded
6 changed files with 42 additions and 11 deletions

View File

@@ -6871,6 +6871,18 @@ int sqlite3PagerCloseWal(Pager *pPager){
return rc;
}
/*
** A read-lock must be held on the pager when this function is called. If
** the pager is in WAL mode and the WAL file currently contains one or more
** frames, return the size in bytes of the page images stored within the
** WAL frames. Otherwise, if this is not a WAL database or the WAL file
** is empty, return 0.
*/
int sqlite3PagerWalFramesize(Pager *pPager){
assert( pPager->eState==PAGER_SHARED );
return sqlite3WalFramesize(pPager->pWal);
}
#ifdef SQLITE_HAS_CODEC
/*
** This function is called by the wal module when writing page content