1
0
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:
danielk1977
2004-06-10 05:59:24 +00:00
parent a3f3a5f3d2
commit 0de0bb3360
7 changed files with 46 additions and 21 deletions

View File

@@ -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;