From: aswift Date: Sat, 11 Nov 2006 01:31:58 +0000 (+0000) Subject: The uninitialized file descriptor from the unixFile structure is passed to sqlite3Det... X-Git-Tag: version-3.6.10~2660 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448aa6f71a71c2103390dd1c83ade3be83acc2a4;p=thirdparty%2Fsqlite.git The uninitialized file descriptor from the unixFile structure is passed to sqlite3DetectLockingStyle in allocateUnixFile rather than the file descriptor passed in. This was causing the locking detection on NFS file systems to behave somewhat randomly and the result was locks were not respected and data loss could occur. (CVS 3508) FossilOrigin-Name: b9dd16ef3df0785d8d0eea9a6f2ad580a7289834 --- diff --git a/manifest b/manifest index c92b121b7d..52c4a83c1d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sthe\sdocumentation\sto\stalk\sabout\sthe\snew\ssqlite3_prepare_v2()\sAPI.\s(CVS\s3507) -D 2006-11-09T15:18:00 +C The\suninitialized\sfile\sdescriptor\sfrom\sthe\sunixFile\sstructure\sis\spassed\sto\ssqlite3DetectLockingStyle\sin\sallocateUnixFile\srather\sthan\sthe\sfile\sdescriptor\spassed\sin.\s\sThis\swas\scausing\sthe\slocking\sdetection\son\sNFS\sfile\ssystems\sto\sbehave\ssomewhat\srandomly\sand\sthe\sresult\swas\slocks\swere\snot\srespected\sand\sdata\sloss\scould\soccur.\s(CVS\s3508) +D 2006-11-11T01:31:58 F Makefile.in 8e14898d41a53033ecb687d93c9cd5d109fb9ae3 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -81,7 +81,7 @@ F src/os_os2.c c1bfc0c326f63caf0c94ab5523010ce0f5458070 F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 -F src/os_unix.c f9a46b57af055b2c02ec040c86ab74111eca12e8 +F src/os_unix.c d3b6b66b79777c9177d76bd5c68c227978c4593c F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c cac5f9b60faacd46874aa8dfefdb7dc4d0437ff9 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b @@ -421,7 +421,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P f1efae9224170c9155afcf17ab3ee769a557b874 -R adf488b4d6da9bed5bc3345f836efae9 -U drh -Z 758db848cd8f84179c36f5b0ca9ce8d0 +P d9e14b6121a7b6786cccafd6e1e83474554632aa +R b9b6d86976fa6c9365d6988ebb2e1f22 +U aswift +Z ccdfaf17a9a8b81bf7be0f75eab131fd diff --git a/manifest.uuid b/manifest.uuid index f5199a91a7..bee0d6af46 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d9e14b6121a7b6786cccafd6e1e83474554632aa \ No newline at end of file +b9dd16ef3df0785d8d0eea9a6f2ad580a7289834 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 3152190c46..08c0191e0d 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2450,7 +2450,7 @@ static int allocateUnixFile( unixFile f; int rc; - lockingStyle = sqlite3DetectLockingStyle(zFilename, f.h); + lockingStyle = sqlite3DetectLockingStyle(zFilename, h); if ( lockingStyle == posixLockingStyle ) { sqlite3OsEnterMutex(); rc = findLockInfo(h, &f.pLock, &f.pOpen);