mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Misc fixes for test cases failing due to the new locking model. (CVS 1561)
FossilOrigin-Name: 71e98d0d089576433c4b06dcba1c57063bd366f5
This commit is contained in:
15
src/pager.c
15
src/pager.c
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.121 2004/06/10 04:32:17 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.122 2004/06/10 05:59:25 danielk1977 Exp $
|
||||
*/
|
||||
#include "os.h" /* Must be first to enable large file support */
|
||||
#include "sqliteInt.h"
|
||||
@@ -521,7 +521,11 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
|
||||
|
||||
/* If the pager is in RESERVED state, then there must be a copy of this
|
||||
** page in the pager cache. In this case just update the pager cache,
|
||||
** not the database file.
|
||||
** not the database file. The page is left marked dirty in this case.
|
||||
**
|
||||
** FIX ME: Ideally the page would only be left marked dirty when the
|
||||
** pager is in RESERVED state if it was dirty when this statement
|
||||
** transaction was started.
|
||||
**
|
||||
** If in EXCLUSIVE state, then we update the pager cache if it exists
|
||||
** and the main file. The page is then marked not dirty.
|
||||
@@ -545,8 +549,11 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
|
||||
if( pPager->xDestructor ){
|
||||
pPager->xDestructor(pData, pPager->pageSize);
|
||||
}
|
||||
pPg->dirty = 0;
|
||||
pPg->needSync = 0;
|
||||
if( pPager->state==PAGER_EXCLUSIVE ){
|
||||
pPg->dirty = 0;
|
||||
pPg->needSync = 0;
|
||||
}
|
||||
|
||||
CODEC(pPager, pData, pPg->pgno, 3);
|
||||
}
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user