diff options
author | dan <dan@noemail.net> | 2013-04-26 18:36:58 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2013-04-26 18:36:58 +0000 |
commit | 8e4714b3033abfe8e48ffac1845166de42d4ddc3 (patch) | |
tree | c9efb7a7bb906bc36c4c5419ed678d7479e29ab7 /src | |
parent | 77b428aa33b4fe7f070a79f610bfd38d7d50a30f (diff) | |
download | sqlite-8e4714b3033abfe8e48ffac1845166de42d4ddc3.tar.gz sqlite-8e4714b3033abfe8e48ffac1845166de42d4ddc3.zip |
Avoid unnecessarily reseting the pager cache after committing a transaction that takes advantage of the SQLITE_IOCAP_ATOMIC related optimization.
FossilOrigin-Name: c47144e98c0a0f9e09780c945de10c57b6a495ea
Diffstat (limited to 'src')
-rw-r--r-- | src/pager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pager.c b/src/pager.c index 1c8b5df65..dffcf602d 100644 --- a/src/pager.c +++ b/src/pager.c @@ -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{ |