diff options
author | drh <drh@noemail.net> | 2008-05-01 18:01:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-05-01 18:01:46 +0000 |
commit | b7d636205bfbcc488d98db8f69740bcf564c6774 (patch) | |
tree | 1db18222df198b5b4aaeb205ee1a9b9d4d462acb /src | |
parent | 26e4a8b11d1873507746bdb5a98f1b68468b517d (diff) | |
download | sqlite-b7d636205bfbcc488d98db8f69740bcf564c6774.tar.gz sqlite-b7d636205bfbcc488d98db8f69740bcf564c6774.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/journal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal.c b/src/journal.c index 7cbe5bc9f..bdc36bcae 100644 --- a/src/journal.c +++ b/src/journal.c @@ -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; } |