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

If the sector size is greater than the database page size, SQLite journals all pages that lie within a sector before writing to any of them. This change ensure that a journal sync does not occur halfway through journalling the set of pages that belong to a single sector. (CVS 5605)

FossilOrigin-Name: 16f612d61e00938f29ecae4ebfe598be7a8709a8
This commit is contained in:
danielk1977
2008-08-25 07:12:28 +00:00
parent 33e3216a3d
commit 8c20014a0a
5 changed files with 45 additions and 31 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.477 2008/08/23 18:53:08 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.478 2008/08/25 07:12:29 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -2442,6 +2442,10 @@ static int pagerStress(void *p, PgHdr *pPg){
Pager *pPager = (Pager *)p;
int rc = SQLITE_OK;
if( pPager->doNotSync ){
return SQLITE_OK;
}
assert( pPg->flags&PGHDR_DIRTY );
if( pPager->errCode==SQLITE_OK ){
if( pPg->flags&PGHDR_NEED_SYNC ){