/ Check-in [3f7dbdb5]
Login

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

Overview
Comment:Permit sqlite3_shutdown() to be called with OMIT_WSD enabled and without having called sqlite3_initialize() first.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3f7dbdb5df38bd4b8cd49d22a23b8412b8d506e5
User & Date: mistachkin 2014-12-23 20:42:48
Context
2014-12-23
21:17
Merge the new and improved releasetest.tcl script into trunk. Add a "make releasetest" target to the autoconf makefile. check-in: 1deb00ec user: drh tags: trunk
20:42
Permit sqlite3_shutdown() to be called with OMIT_WSD enabled and without having called sqlite3_initialize() first. check-in: 3f7dbdb5 user: mistachkin tags: trunk
20:05
Fix a potential segfault following OOM error in the test harness. The SQLite core itself is not at fault. check-in: 1bb26695 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

   267    267   ** there are outstanding database connections or memory allocations or
   268    268   ** while any part of SQLite is otherwise in use in any thread.  This
   269    269   ** routine is not threadsafe.  But it is safe to invoke this routine
   270    270   ** on when SQLite is already shut down.  If SQLite is already shut down
   271    271   ** when this routine is invoked, then this routine is a harmless no-op.
   272    272   */
   273    273   int sqlite3_shutdown(void){
          274  +#ifdef SQLITE_OMIT_WSD
          275  +  int rc = sqlite3_wsd_init(4096, 24);
          276  +  if( rc!=SQLITE_OK ){
          277  +    return rc;
          278  +  }
          279  +#endif
          280  +
   274    281     if( sqlite3GlobalConfig.isInit ){
   275    282   #ifdef SQLITE_EXTRA_SHUTDOWN
   276    283       void SQLITE_EXTRA_SHUTDOWN(void);
   277    284       SQLITE_EXTRA_SHUTDOWN();
   278    285   #endif
   279    286       sqlite3_os_end();
   280    287       sqlite3_reset_auto_extension();