mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Avoid unnecessarily reseting the pager cache after committing a transaction that takes advantage of the SQLITE_IOCAP_ATOMIC related optimization.
FossilOrigin-Name: c47144e98c0a0f9e09780c945de10c57b6a495ea
This commit is contained in:
@@ -5927,6 +5927,11 @@ static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
|
||||
pPager->aStat[PAGER_STAT_WRITE]++;
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
/* Update the pager's copy of the change-counter. Otherwise, the
|
||||
** next time a read transaction is opened the cache will be
|
||||
** flushed (as the change-counter values will not match). */
|
||||
const void *pCopy = (const void *)&((const char *)zBuf)[24];
|
||||
memcpy(&pPager->dbFileVers, pCopy, sizeof(pPager->dbFileVers));
|
||||
pPager->changeCountDone = 1;
|
||||
}
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user