mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Follow-up to [0bf0fd242b93c3bd30]: only reset the pager when adding a
new codec, not when overwriting an existing codec. Also, improve a comment in the pcache1 subsystem. FossilOrigin-Name: 5c040fdb013d178e5dffa300621eab91b92beb085ffb9ef2ba08f6bf1dd4013e
This commit is contained in:
@@ -7032,8 +7032,11 @@ void sqlite3PagerSetCodec(
|
||||
void (*xCodecFree)(void*),
|
||||
void *pCodec
|
||||
){
|
||||
pager_reset(pPager);
|
||||
if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
|
||||
if( pPager->xCodecFree ){
|
||||
pPager->xCodecFree(pPager->pCodec);
|
||||
}else{
|
||||
pager_reset(pPager);
|
||||
}
|
||||
pPager->xCodec = pPager->memDb ? 0 : xCodec;
|
||||
pPager->xCodecSizeChng = xCodecSizeChng;
|
||||
pPager->xCodecFree = xCodecFree;
|
||||
|
Reference in New Issue
Block a user