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

Always reset the pager before changing the codec.

FossilOrigin-Name: 0bf0fd242b93c3bd308ab46db1be9edef141b89db07a0f5a4ed8b23c963da0d5
This commit is contained in:
drh
2018-10-11 16:38:56 +00:00
parent f7f2a82aa0
commit 53f5f00762
3 changed files with 8 additions and 7 deletions

View File

@@ -7021,6 +7021,7 @@ void sqlite3PagerSetCodec(
void (*xCodecFree)(void*),
void *pCodec
){
pager_reset(pPager);
if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
pPager->xCodec = pPager->memDb ? 0 : xCodec;
pPager->xCodecSizeChng = xCodecSizeChng;