mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Enhance WAL mode so that the WAL file honors the journal size limit set
by PRAGMA journal_size_limit. FossilOrigin-Name: db7e500f69faf1906a84991ba67d26a195f02ae5
This commit is contained in:
@@ -6607,6 +6607,7 @@ int sqlite3PagerOkToChangeJournalMode(Pager *pPager){
|
||||
i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
|
||||
if( iLimit>=-1 ){
|
||||
pPager->journalSizeLimit = iLimit;
|
||||
sqlite3WalLimit(pPager->pWal, iLimit);
|
||||
}
|
||||
return pPager->journalSizeLimit;
|
||||
}
|
||||
@@ -6698,7 +6699,8 @@ static int pagerOpenWal(Pager *pPager){
|
||||
*/
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3WalOpen(pPager->pVfs,
|
||||
pPager->fd, pPager->zWal, pPager->exclusiveMode, &pPager->pWal
|
||||
pPager->fd, pPager->zWal, pPager->exclusiveMode,
|
||||
pPager->journalSizeLimit, &pPager->pWal
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user