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

Clear the Pager.dbModified flag when unlocking the database. Assert that it is clear when locking the database.

FossilOrigin-Name: d17ec16b7c5051c904c09580a856593b2fb85edc
This commit is contained in:
dan
2009-12-02 14:44:32 +00:00
parent 9f3962e7b5
commit bc7c039ce2
4 changed files with 14 additions and 23 deletions

View File

@@ -1147,6 +1147,7 @@ static void pager_unlock(Pager *pPager){
pPager->changeCountDone = 0;
pPager->state = PAGER_UNLOCK;
pPager->dbModified = 0;
}
}
@@ -2523,8 +2524,11 @@ static int pager_wait_on_lock(Pager *pPager, int locktype){
assert( PAGER_RESERVED==RESERVED_LOCK );
assert( PAGER_EXCLUSIVE==EXCLUSIVE_LOCK );
/* If the file is currently unlocked then the size must be unknown */
/* If the file is currently unlocked then the size must be unknown. It
** must not have been modified at this point.
*/
assert( pPager->state>=PAGER_SHARED || pPager->dbSizeValid==0 );
assert( pPager->state>=PAGER_SHARED || pPager->dbModified==0 );
/* Check that this is either a no-op (because the requested lock is
** already held, or one of the transistions that the busy-handler