Skip to content

Commit

Permalink
Fix issue #36
Browse files Browse the repository at this point in the history
Clear pager cache after setting a new passphrase to force a reread of the database header.
  • Loading branch information
utelle committed Apr 15, 2021
1 parent 5013599 commit ab5df84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/codecext.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ mcReportCodecError(BtShared* pBt, int error)
pBt->pPager->errCode = error;
setGetterMethod(pBt->pPager);
pBt->db->errCode = error;
if (error == SQLITE_OK)
{
/* Clear cache to force reread of database after a new passphrase has been set */
sqlite3PagerClearCache(pBt->pPager);
}
}

/*
Expand Down

0 comments on commit ab5df84

Please sign in to comment.