From: shane Date: Thu, 14 May 2009 03:21:28 +0000 (+0000) Subject: Documentation updates to better explain the SQLITE_OPEN_EXCLUSIVE flag. Ticket ... X-Git-Tag: version-3.6.15~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=089b0a4d9cb84e0e06d4806569798c0f356d550a;p=thirdparty%2Fsqlite.git Documentation updates to better explain the SQLITE_OPEN_EXCLUSIVE flag. Ticket #3855. (CVS 6637) FossilOrigin-Name: 6bd44f36f46810eb9ce30c7780de6bcfe4aadf5f --- diff --git a/manifest b/manifest index 1ae109572f..b5afd71bd9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Additional\ssimplifications\sto\sbuild.c\sin\ssupport\sfull\scoverage\stesting.\s(CVS\s6636) -D 2009-05-13T22:58:29 +C Documentation\supdates\sto\sbetter\sexplain\sthe\sSQLITE_OPEN_EXCLUSIVE\sflag.\s\sTicket\s#3855.\s(CVS\s6637) +D 2009-05-14T03:21:28 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -160,7 +160,7 @@ F src/resolve.c 2ce8f8bc8a0c913cbaec3fb3da2be113ea1fa5af F src/rowset.c 14d12b5e81b5907b87d511f6f4219805f96a4b55 F src/select.c 2877098ffabd751c274aa5f993d515484d955896 F src/shell.c 0a11f831603f17fea20ca97133c0f64e716af4a7 -F src/sqlite.h.in d028ed6e0e991d730644f0b418964df1b51e6c53 +F src/sqlite.h.in f266dffc24aec00f1599bf935bcbee5e4a2a3e09 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17 F src/sqliteInt.h d20ac97b4daf97621d641f52ac16e8ff26fb53fd F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d @@ -729,7 +729,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P c684957991fe45cbcb188d2a419501c3f1fdc93f -R b7d938cf0534e6a7525437136b322f35 -U drh -Z a945f0494911586b285a588e892ed85a +P 913d11149396d3dc797f1efeb4f7e60865483399 +R abb9e0125d369edd65ceec50369d192a +U shane +Z 0b4778e326f1addd073ef44654a5d985 diff --git a/manifest.uuid b/manifest.uuid index e51e387276..63b930569f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -913d11149396d3dc797f1efeb4f7e60865483399 \ No newline at end of file +6bd44f36f46810eb9ce30c7780de6bcfe4aadf5f \ No newline at end of file diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 1c46ceed9a..fff25a5358 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -30,7 +30,7 @@ ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** -** @(#) $Id: sqlite.h.in,v 1.448 2009/05/09 18:59:42 drh Exp $ +** @(#) $Id: sqlite.h.in,v 1.449 2009/05/14 03:21:28 shane Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -392,20 +392,20 @@ int sqlite3_exec( ** in the 4th parameter to the xOpen method of the ** [sqlite3_vfs] object. */ -#define SQLITE_OPEN_READONLY 0x00000001 -#define SQLITE_OPEN_READWRITE 0x00000002 -#define SQLITE_OPEN_CREATE 0x00000004 -#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 -#define SQLITE_OPEN_EXCLUSIVE 0x00000010 -#define SQLITE_OPEN_MAIN_DB 0x00000100 -#define SQLITE_OPEN_TEMP_DB 0x00000200 -#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 -#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 -#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 -#define SQLITE_OPEN_SUBJOURNAL 0x00002000 -#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 -#define SQLITE_OPEN_NOMUTEX 0x00008000 -#define SQLITE_OPEN_FULLMUTEX 0x00010000 +#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ +#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ +#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ +#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ +#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ +#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ +#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ +#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ +#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ +#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ /* ** CAPI3REF: Device Characteristics {H10240} @@ -702,9 +702,14 @@ typedef struct sqlite3_mutex sqlite3_mutex; ** deleted when it is closed. The [SQLITE_OPEN_DELETEONCLOSE] ** will be set for TEMP databases, journals and for subjournals. ** -** The [SQLITE_OPEN_EXCLUSIVE] flag means the file should be opened -** for exclusive access. This flag is set for all files except -** for the main database file. +** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction +** with the [SQLITE_OPEN_CREATE] flag, which are both directly +** analogous to the O_EXCL and O_CREAT flags of the POSIX open() +** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the +** SQLITE_OPEN_CREATE, is used to indicate that file should always +** be created, and that it is an error if it already exists. +** It is not used to indicate the file should be opened +** for exclusive access. ** ** At least szOsFile bytes of memory are allocated by SQLite ** to hold the [sqlite3_file] structure passed as the third