/ Check-in [b2aa48b5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarify the use of sqlite3_shutdown(). Ticket [f9af981dd2a2]. Comment changes only - no changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b2aa48b52f140ad722001de686c5b2f802e9babd
User & Date: drh 2009-10-20 15:27:55
References
2009-10-20
15:28 Fixed ticket [f9af981d]: sqlite3_shutdown documentation needs to mention danger plus 3 other changes artifact: 9bae21ee user: drh
Context
2009-10-21
02:00
For Windows VFS, modified xGetLastError() to call FormatMessage() with the FORMAT_MESSAGE_IGNORE_INSERTS option. Additionally updated to ensure strings are returned as UTF8. Ticket [39c85e8a4e]. check-in: 761396f8 user: shane tags: trunk
2009-10-20
15:27
Clarify the use of sqlite3_shutdown(). Ticket [f9af981dd2a2]. Comment changes only - no changes to code. check-in: b2aa48b5 user: drh tags: trunk
15:01
Fix the VACUUM command so that when the MAIN and TEMP databases have identically named tables, content from the TEMP database does not accidently overwrite MAIN database content. Ticket [d82e3f3721296e905d7e8c9dee718f71a826b0eb]. Note that this bug could potentially lead to database corruption. check-in: 0bbd8d72 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

   816    816   
   817    817   /*
   818    818   ** CAPI3REF: Initialize The SQLite Library {H10130} <S20000><S30100>
   819    819   **
   820    820   ** The sqlite3_initialize() routine initializes the
   821    821   ** SQLite library.  The sqlite3_shutdown() routine
   822    822   ** deallocates any resources that were allocated by sqlite3_initialize().
          823  +** This routines are designed to aid in process initialization and
          824  +** shutdown on embedded systems.  Workstation applications using
          825  +** SQLite normally do not need to invoke either of these routines.
   823    826   **
   824    827   ** A call to sqlite3_initialize() is an "effective" call if it is
   825    828   ** the first time sqlite3_initialize() is invoked during the lifetime of
   826    829   ** the process, or if it is the first time sqlite3_initialize() is invoked
   827    830   ** following a call to sqlite3_shutdown().  Only an effective call
   828    831   ** of sqlite3_initialize() does any initialization.  All other calls
   829    832   ** are harmless no-ops.
   830    833   **
   831    834   ** A call to sqlite3_shutdown() is an "effective" call if it is the first
   832    835   ** call to sqlite3_shutdown() since the last sqlite3_initialize().  Only
   833    836   ** an effective call to sqlite3_shutdown() does any deinitialization.
   834         -** All other calls to sqlite3_shutdown() are harmless no-ops.
          837  +** All other valid calls to sqlite3_shutdown() are harmless no-ops.
   835    838   **
   836         -** Among other things, sqlite3_initialize() shall invoke
          839  +** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
          840  +** is not.  The sqlite3_shutdown() interface must only be called from a
          841  +** single thread.  All open [database connections] must be closed and all
          842  +** other SQLite resources must be deallocated prior to invoking
          843  +** sqlite3_shutdown().
          844  +**
          845  +** Among other things, sqlite3_initialize() will invoke
   837    846   ** sqlite3_os_init().  Similarly, sqlite3_shutdown()
   838         -** shall invoke sqlite3_os_end().
          847  +** will invoke sqlite3_os_end().
   839    848   **
   840    849   ** The sqlite3_initialize() routine returns [SQLITE_OK] on success.
   841    850   ** If for some reason, sqlite3_initialize() is unable to initialize
   842    851   ** the library (perhaps it is unable to allocate a needed resource such
   843    852   ** as a mutex) it returns an [error code] other than [SQLITE_OK].
   844    853   **
   845    854   ** The sqlite3_initialize() routine is called internally by many other