From: shane Date: Wed, 5 Aug 2009 04:08:29 +0000 (+0000) Subject: Simplified conditional for read-only lock in winceLockFile() function. Ticket #3991... X-Git-Tag: cvs-to-fossil-cutover~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=338ea3c14032afa2af0661f318b58ac58d25d03b;p=thirdparty%2Fsqlite.git Simplified conditional for read-only lock in winceLockFile() function. Ticket #3991. (CVS 6958) FossilOrigin-Name: a1c184cd2ac5a7559d787e6c34b1d0ce034d10cf --- diff --git a/manifest b/manifest index 80d58d993d..af1b0f0183 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\ssure\sall\sdatabase\sconnections\sare\sclosed\sat\sthe\send\sof\sthe\stest\scase\nfor\sticket\s#3810.\s(CVS\s6957) -D 2009-08-01T18:22:30 +C Simplified\sconditional\sfor\sread-only\slock\sin\swinceLockFile()\sfunction.\s\sTicket\s#3991.\s(CVS\s6958) +D 2009-08-05T04:08:30 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -146,7 +146,7 @@ F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_unix.c cdb2a08b9ce4aa13b3f7b91d4dd60fb48be9f56a -F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405 +F src/os_win.c 79bb3c59d60bc6faadd379cf036c132fa545d7d6 F src/pager.c 4aa16cc8bc8e4b0b457fb3ddb600970381b2be7d F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5 @@ -741,7 +741,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 -P 102785b9fbc5ab5dd740110243f080e3f3661e87 -R 825beaeb9e10803cd8d6f36b2d64db6f -U drh -Z ed1a70920562fb1d1966a2a58ddd41b8 +P 9bca5a0e8f22da6be41b0eda298fd2e19f64e8b6 +R 04856c776b0c29b7de6f8f3f7e40086c +U shane +Z 3da571aa1f183b7a1140799568169e44 diff --git a/manifest.uuid b/manifest.uuid index a700ca2dc5..86b8d474ea 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9bca5a0e8f22da6be41b0eda298fd2e19f64e8b6 \ No newline at end of file +a1c184cd2ac5a7559d787e6c34b1d0ce034d10cf \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 3bc769bd73..1acffa8a00 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to windows. ** -** $Id: os_win.c,v 1.156 2009/04/23 19:08:33 shane Exp $ +** $Id: os_win.c,v 1.157 2009/08/05 04:08:30 shane Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_WIN /* This file is used for windows only */ @@ -483,9 +483,8 @@ static BOOL winceLockFile( } /* Want a read-only lock? */ - else if ((dwFileOffsetLow >= SHARED_FIRST && - dwFileOffsetLow < SHARED_FIRST + SHARED_SIZE) && - nNumberOfBytesToLockLow == 1){ + else if (dwFileOffsetLow == SHARED_FIRST && + nNumberOfBytesToLockLow == 1){ if (pFile->shared->bExclusive == 0){ pFile->local.nReaders ++; if (pFile->local.nReaders == 1){ @@ -504,6 +503,7 @@ static BOOL winceLockFile( bReturn = TRUE; } } + /* Want a reserved lock? */ else if (dwFileOffsetLow == RESERVED_BYTE && nNumberOfBytesToLockLow == 1){ if (pFile->shared->bReserved == 0) {