aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2009-04-28 05:27:20 +0000
committerdanielk1977 <danielk1977@noemail.net>2009-04-28 05:27:20 +0000
commitf761f76262ecae8f9601c9ee51fe89db6596b9ec (patch)
treeb2628837a51ee1fe753938fbce5a583dd109791c /src
parent1691cd4bc0c949351d82da415d84cde2156b4e31 (diff)
downloadsqlite-f761f76262ecae8f9601c9ee51fe89db6596b9ec.tar.gz
sqlite-f761f76262ecae8f9601c9ee51fe89db6596b9ec.zip
Avoid changing the pager journal-mode once a write-transaction is open, even if no database pages have been modified. (CVS 6554)
FossilOrigin-Name: ad8aba3eff90d42b936e3644f10cbbd431eebad8
Diffstat (limited to 'src')
-rw-r--r--src/pager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pager.c b/src/pager.c
index aef663c95..001ed0844 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.582 2009/04/20 17:43:03 drh Exp $
+** @(#) $Id: pager.c,v 1.583 2009/04/28 05:27:20 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -5218,6 +5218,7 @@ int sqlite3PagerJournalMode(Pager *pPager, int eMode){
&& (!MEMDB || eMode==PAGER_JOURNALMODE_MEMORY
|| eMode==PAGER_JOURNALMODE_OFF)
&& !pPager->dbModified
+ && (!isOpen(pPager->jfd) || 0==pPager->journalOff)
){
if( isOpen(pPager->jfd) ){
sqlite3OsClose(pPager->jfd);