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

In sqlite3PagerWrite(), do not set the PGHDR_NEED_SYNC flag on a page if an IO error occured while attempting to journal it. (CVS 6887)

FossilOrigin-Name: b9be365d85fddedbfa93eebf3ee62a140cbaa426
This commit is contained in:
danielk1977
2009-07-13 11:22:10 +00:00
parent 8f880a8cfb
commit a299d61249
4 changed files with 16 additions and 11 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.606 2009/07/12 02:31:37 drh Exp $
** @(#) $Id: pager.c,v 1.607 2009/07/13 11:22:10 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -4404,7 +4404,7 @@ int sqlite3PagerWrite(DbPage *pDbPage){
** journal file must contain sync()ed copies of all of them
** before any of them can be written out to the database file.
*/
if( needSync ){
if( rc==SQLITE_OK && needSync ){
assert( !MEMDB && pPager->noSync==0 );
for(ii=0; ii<nPage && needSync; ii++){
PgHdr *pPage = pager_lookup(pPager, pg1+ii);