Index: src/sqlite.h.in ================================================================== --- src/sqlite.h.in +++ src/sqlite.h.in @@ -28,11 +28,11 @@ ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** -** @(#) $Id: sqlite.h.in,v 1.368 2008/07/11 16:15:18 drh Exp $ +** @(#) $Id: sqlite.h.in,v 1.369 2008/07/12 20:35:08 drh Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ #include /* Needed for the definition of va_list */ @@ -1047,11 +1047,16 @@ ** mutexes on [database connection] and [prepared statement] objects. ** In this mode (which is the default when SQLite is compiled with ** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access ** to [database connections] and [prepared statements] so that the ** application is free to use the same [database connection] or the -** same [prepared statement] in different threads at the same time. +** same [prepared statement] in different threads at the same time. +** +**

This configuration option merely sets the default mutex +** behavior to serialize access to [database connections]. Individual +** [database connections] can override this setting +** using the [SQLITE_OPEN_NOMUTEX] flag to [sqlite3_open_v2()].

** **
SQLITE_CONFIG_MALLOC
**
This option takes a single argument which is a pointer to an ** instance of the [sqlite3_mem_methods] structure. The argument specifies ** alternative low-level memory allocation routines to be used in place of @@ -2280,11 +2285,11 @@ ** ** The sqlite3_open_v2() interface works like sqlite3_open() ** except that it accepts two additional parameters for additional control ** over the new database connection. The flags parameter can take one of ** the following three values, optionally combined with the -** SQLITE_OPEN_NOMUTEX flag: +** [SQLITE_OPEN_NOMUTEX] flag: ** **
**
[SQLITE_OPEN_READONLY]
**
The database is opened in read-only mode. If the database does not ** already exist, an error is returned.
@@ -2300,16 +2305,20 @@ ** sqlite3_open() and sqlite3_open16().
** ** ** If the 3rd parameter to sqlite3_open_v2() is not one of the ** combinations shown above or one of the combinations shown above combined -** with the SQLITE_OPEN_NOMUTEX flag, then the behavior is undefined. +** with the [SQLITE_OPEN_NOMUTEX] flag, then the behavior is undefined. ** -** If the SQLITE_OPEN_NOMUTEX flag is set, then the opened database handle -** is not threadsafe. If two threads attempt to use the database handle or -** any of it's statement handles simultaneously, the results will be -** unpredictable. +** If the [SQLITE_OPEN_NOMUTEX] flag is set, then mutexes on the +** opened [database connection] are disabled and the appliation must +** insure that access to the [database connection] and its associated +** [prepared statements] is serialized. The [SQLITE_OPEN_NOMUTEX] flag +** is the default behavior is SQLite is configured using the +** [SQLITE_CONFIG_MULTITHREAD] or [SQLITE_CONFIG_SINGLETHREAD] options +** to [sqlite3_config()]. The [SQLITE_OPEN_NOMUTEX] flag only makes a +** difference when SQLite is in its default [SQLITE_CONFIG_SERIALIZED] mode. ** ** If the filename is ":memory:", then a private, temporary in-memory database ** is created for the connection. This in-memory database will vanish when ** the database connection is closed. Future versions of SQLite might ** make use of additional special filenames that begin with the ":" character.