From: drh Date: Thu, 26 Nov 2015 02:21:05 +0000 (+0000) Subject: Small simplification to the xOpen method in the unix VFS. X-Git-Tag: version-3.10.0~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a2d970a1a0e1d2a292ae60552dacbb77c1ca598;p=thirdparty%2Fsqlite.git Small simplification to the xOpen method in the unix VFS. FossilOrigin-Name: 96e7d638ecdabbf84a152036eb01d408d142839e --- diff --git a/manifest b/manifest index 36771d7a16..38bdbfc421 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Simplify\sthe\stemporary\sfilename\sgenerator\sand\sthe\stime-of-day\sfunctions\sin\nthe\sunix\sVFS. -D 2015-11-25T23:13:14.833 +C Small\ssimplification\sto\sthe\sxOpen\smethod\sin\sthe\sunix\sVFS. +D 2015-11-26T02:21:05.964 F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc e928e68168df69b353300ac87c10105206653a03 @@ -323,7 +323,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8 F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf F src/os_common.h abdb9a191a367793268fe553d25bab894e986a0e F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa -F src/os_unix.c 3f22d7f2577b963261e9ef3b177b10a3083ed518 +F src/os_unix.c 9b3a586ea41129a0a09c13fe421b2d9464964330 F src/os_win.c 386fba30419e8458b13209781c2af5590eab2811 F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/pager.c 18341e2b759b447cbc82fb9215d08d9c5864e92e @@ -1405,7 +1405,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 697b20534c2d780cdd8cc165d2930f6e56480770 -R 8a05f9924f5556e21d4d47be27f99435 +P 6c5621ce1b1a65913b088ed8be65f9b689260d2c +R 8d655a3f1e63bc6ba67ee6f8b2910653 U drh -Z fea2e37220480a85fb0635b776213ee8 +Z 1746dd40560755829f1cb168fd739f6f diff --git a/manifest.uuid b/manifest.uuid index 1b75114db0..89850da981 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6c5621ce1b1a65913b088ed8be65f9b689260d2c \ No newline at end of file +96e7d638ecdabbf84a152036eb01d408d142839e \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 3745827f69..d86a4a7457 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5746,7 +5746,8 @@ static int unixOpen( } fd = robust_open(zName, openFlags, openMode); OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags)); - if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){ + assert( !isExclusive || (openFlags & O_CREAT)!=0 ); + if( fd<0 && errno!=EISDIR && isReadWrite ){ /* Failed to open the file for read/write access. Try read-only. */ flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE); openFlags &= ~(O_RDWR|O_CREAT);