1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Fix a problem with journal files being created unnecessarily when doing

an atomic write in exclusive access locking mode.  Fix a test script problem. (CVS 5075)

FossilOrigin-Name: 70e708660fec0b6f6c41efc2e29f1d7ae6785b7e
This commit is contained in:
drh
2008-05-01 18:01:46 +00:00
parent 26e4a8b11d
commit b7d636205b
5 changed files with 17 additions and 16 deletions

View File

@@ -10,7 +10,7 @@
**
*************************************************************************
**
** @(#) $Id: journal.c,v 1.7 2007/09/06 13:49:37 drh Exp $
** @(#) $Id: journal.c,v 1.8 2008/05/01 18:01:47 drh Exp $
*/
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
@@ -149,9 +149,10 @@ static int jrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
static int jrnlSync(sqlite3_file *pJfd, int flags){
int rc;
JournalFile *p = (JournalFile *)pJfd;
rc = createFile(p);
if( rc==SQLITE_OK ){
if( p->pReal ){
rc = sqlite3OsSync(p->pReal, flags);
}else{
rc = SQLITE_OK;
}
return rc;
}