diff options
author | drh <drh@noemail.net> | 2019-12-27 01:50:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-27 01:50:46 +0000 |
commit | fce8165ec6e6e8faea57e0130cc84ecf104fb471 (patch) | |
tree | 057a020417ba7b5deb208e8914bbcd7095fac808 /src | |
parent | 8d7f44c03a1522d5f1907e2ce5fb980ab74de088 (diff) | |
download | sqlite-fce8165ec6e6e8faea57e0130cc84ecf104fb471.tar.gz sqlite-fce8165ec6e6e8faea57e0130cc84ecf104fb471.zip |
Ensure that the Pager.changeCountDone flag is cleared whenever dropping
the write lock, even when transitioning from EXCLUSIVE locking mode into
NORMAL locking mode while in WAL mode. Ticket [fb3b3024ea238d5c].
FossilOrigin-Name: 846b1de6e5a9e418f225273dc033234c64c116fcd89c8261522b4902c248451f
Diffstat (limited to 'src')
-rw-r--r-- | src/pager.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pager.c b/src/pager.c index 844ecf804..0fae9ae3d 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1172,6 +1172,7 @@ static int pagerUnlockDb(Pager *pPager, int eLock){ } IOTRACE(("UNLOCK %p %d\n", pPager, eLock)) } + pPager->changeCountDone = pPager->tempFile; /* ticket fb3b3024ea238d5c */ return rc; } @@ -1893,7 +1894,6 @@ static void pager_unlock(Pager *pPager){ ** code is cleared and the cache reset in the block below. */ assert( pPager->errCode || pPager->eState!=PAGER_ERROR ); - pPager->changeCountDone = 0; pPager->eState = PAGER_OPEN; } @@ -2157,7 +2157,6 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){ && (!pagerUseWal(pPager) || sqlite3WalExclusiveMode(pPager->pWal, 0)) ){ rc2 = pagerUnlockDb(pPager, SHARED_LOCK); - pPager->changeCountDone = 0; } pPager->eState = PAGER_READER; pPager->setMaster = 0; |