]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a locking race condition in Windows 10 that can occur when two or more
authordrh <drh@noemail.net>
Wed, 20 Apr 2016 18:31:27 +0000 (18:31 +0000)
committerdrh <drh@noemail.net>
Wed, 20 Apr 2016 18:31:27 +0000 (18:31 +0000)
processes attempt to recover the same hot journal at the same time.

FossilOrigin-Name: 38a4e9d92887898b779493c71e4500f777a4e2e7

manifest
manifest.uuid
src/os_win.c

index eb27e8449c7ac590e5dcd6bc39fc45dc1fa2e96e..0271d96ed65928591ee3057c998bc67460b466d6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\squotes\sfrom\sidentifiers\sused\sas\sdatatype\snames\sin\sa\sCREATE\sTABLE\nstatement.\s\sFix\sfor\sticket\s[7d7525cb01b68]
-D 2016-04-18T15:46:14.499
+C Fix\sa\slocking\srace\scondition\sin\sWindows\s10\sthat\scan\soccur\swhen\stwo\sor\smore\nprocesses\sattempt\sto\srecover\sthe\ssame\shot\sjournal\sat\sthe\ssame\stime.
+D 2016-04-20T18:31:27.150
 F Makefile.in eba680121821b8a60940a81454316f47a341487a
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836
@@ -360,7 +360,7 @@ F src/os.h 8e976e59eb4ca1c0fca6d35ee803e38951cb0343
 F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
 F src/os_unix.c d0b41a47eb5f0dc00e423a1723aadeab0e78c85f
-F src/os_win.c b169437dff859e308b3726594094a2f8ca922941
+F src/os_win.c 1997a873bfc8296a701bd8e2df8c3d5da5afe956
 F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
 F src/pager.c 38718a019ca762ba4f6795425d5a54db70d1790d
 F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681
@@ -1482,7 +1482,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 3a7d72986fabe9434ff5bd02c93169314f072b23
-R 761e3cafabae5f2f003bf21bdc2befe8
+P eba27d4d17a76884292667d570d542e580ee3e77
+R 91e3493cbc66272eab1ca1f4455591b7
 U drh
-Z 8a9e64fdc933327d2408de0f01f55efc
+Z f74379d7acb8dab3d54fff08dd9ef3d2
index 540eda5836a0b97fce0ffb63a9599859d74e2e98..b7ae2958b92059b7a81e64c515207e5007a2c21b 100644 (file)
@@ -1 +1 @@
-eba27d4d17a76884292667d570d542e580ee3e77
\ No newline at end of file
+38a4e9d92887898b779493c71e4500f777a4e2e7
\ No newline at end of file
index 929ad346cc20911ef392dcddc2281c063ec6b27b..1f264634531cee6adbe02edf045e34f525dbaa10 100644 (file)
@@ -3169,9 +3169,8 @@ static int winLock(sqlite3_file *id, int locktype){
   ** the PENDING_LOCK byte is temporary.
   */
   newLocktype = pFile->locktype;
-  if(   (pFile->locktype==NO_LOCK)
-     || (   (locktype==EXCLUSIVE_LOCK)
-         && (pFile->locktype==RESERVED_LOCK))
+  if( pFile->locktype==NO_LOCK
+   || (locktype==EXCLUSIVE_LOCK && pFile->locktype<=RESERVED_LOCK)
   ){
     int cnt = 3;
     while( cnt-->0 && (res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS,