If the journal file is open when unlocking the database, close it just before unlocking the database file instead of just after. This may fix #3572. (CVS 6171)
FossilOrigin-Name: 36fe9a7a51b5279f1a3964139aa636e81f9c8b06
This commit is contained in:
parent
6338323c49
commit
5f2d46b313
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Version\s3.6.8\s(CVS\s6170)
|
||||
D 2009-01-12T15:46:57
|
||||
C If\sthe\sjournal\sfile\sis\sopen\swhen\sunlocking\sthe\sdatabase,\sclose\sit\sjust\sbefore\sunlocking\sthe\sdatabase\sfile\sinstead\sof\sjust\safter.\sThis\smay\sfix\s#3572.\s(CVS\s6171)
|
||||
D 2009-01-13T16:03:44
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -142,7 +142,7 @@ F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
|
||||
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
||||
F src/os_unix.c 7825c6178597713382d74adbf8c8c00ffcdc42d4
|
||||
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
|
||||
F src/pager.c 34fb9317f73bec079310e7618f2d1bedcc0ac93d
|
||||
F src/pager.c 5a95868f4fe0efd2ec51f89efce470e9d63d6fed
|
||||
F src/pager.h 9870acb2d653848d90d765d7cbf163496d6c8111
|
||||
F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
|
||||
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
|
||||
@ -696,7 +696,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 5d88f8be7342acd2a7ed6f269bec615cd03e59e2
|
||||
R 19b82c43a9e4fa6c4de3bc8b780a712d
|
||||
U drh
|
||||
Z 5604ec7056fdd3ecc5e892da9588c5ed
|
||||
P 8ca0b7c13620c8e2acf73343ebfb13128dd4c3b1
|
||||
R dc332db4a66532171928abb97c3a9ae2
|
||||
U danielk1977
|
||||
Z bf8c7556242ec6811fbf508b077e2823
|
||||
|
@ -1 +1 @@
|
||||
8ca0b7c13620c8e2acf73343ebfb13128dd4c3b1
|
||||
36fe9a7a51b5279f1a3964139aa636e81f9c8b06
|
12
src/pager.c
12
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.548 2009/01/11 17:00:02 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.549 2009/01/13 16:03:44 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -985,10 +985,7 @@ static int addToSavepointBitvecs(Pager *pPager, Pgno pgno){
|
||||
*/
|
||||
static void pager_unlock(Pager *pPager){
|
||||
if( !pPager->exclusiveMode ){
|
||||
int rc = osUnlock(pPager->fd, NO_LOCK);
|
||||
if( rc ) pPager->errCode = rc;
|
||||
pPager->dbSizeValid = 0;
|
||||
IOTRACE(("UNLOCK %p\n", pPager))
|
||||
int rc;
|
||||
|
||||
/* Always close the journal file when dropping the database lock.
|
||||
** Otherwise, another connection with journal_mode=delete might
|
||||
@ -1003,6 +1000,11 @@ static void pager_unlock(Pager *pPager){
|
||||
pPager->pAlwaysRollback = 0;
|
||||
}
|
||||
|
||||
rc = osUnlock(pPager->fd, NO_LOCK);
|
||||
if( rc ) pPager->errCode = rc;
|
||||
pPager->dbSizeValid = 0;
|
||||
IOTRACE(("UNLOCK %p\n", pPager))
|
||||
|
||||
/* If Pager.errCode is set, the contents of the pager cache cannot be
|
||||
** trusted. Now that the pager file is unlocked, the contents of the
|
||||
** cache can be discarded and the error code safely cleared.
|
||||
|
Loading…
x
Reference in New Issue
Block a user