Always sync the journal file after zeroing out the header. (CVS 5036)

FossilOrigin-Name: 5896ae3d68d29dc172c027c72aa2a98ced2b7eb8
This commit is contained in:
drh 2008-04-22 17:15:17 +00:00
parent a664f8ebd0
commit a06ecba2f6
3 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Avoid\snon-contiguous\swrites\swhen\screating\sa\sjournal\sheader.\s(CVS\s5035)
D 2008-04-22T14:31:48
C Always\ssync\sthe\sjournal\sfile\safter\szeroing\sout\sthe\sheader.\s(CVS\s5036)
D 2008-04-22T17:15:18
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -127,7 +127,7 @@ F src/os_unix.c fdec4e5ee5dd555a6ad4a69f38ab35f0788536b4
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
F src/os_win.c 3a60bddd07ea6f8adb2314dd5996ac97b988f403
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c e164d0fc4160e5a34e7633aa493194e20c41ee8a
F src/pager.c 21d426c65c9dcf5718423a967117e9450f238519
F src/pager.h 45ec2188593afd48a25c743529646771d75e83e4
F src/parse.y fc4bd35c6088901f7c8daead26c6fb11c87d22e7
F src/pragma.c 2e4bb2e76e48a32750529fdc4bfe86ac5f54e01b
@ -635,7 +635,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P e29b870ed0db6360a95fb017f56c0b5388efb437
R 436443469e9b85c7665118e338b3a570
U danielk1977
Z 64c57677c26295d2b7511003088df817
P dfacddbb5055b4e104bf536d5f5b35287fbbb904
R b24995cca648ef79387ccd7e0060de3f
U drh
Z 0a520789b52e8367637bc31c78ec10b9

View File

@ -1 +1 @@
dfacddbb5055b4e104bf536d5f5b35287fbbb904
5896ae3d68d29dc172c027c72aa2a98ced2b7eb8

View File

@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.432 2008/04/22 14:31:48 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.433 2008/04/22 17:15:18 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@ -972,6 +972,9 @@ static int zeroJournalHdr(Pager *pPager){
IOTRACE(("JZEROHDR %p\n", pPager))
rc = sqlite3OsWrite(pPager->jfd, zeroHdr, sizeof(zeroHdr), 0);
if( rc==SQLITE_OK ){
rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_DATAONLY | pPager->sync_flags);
}
return rc;
}