/ Check-in [d725d3bb]
Login

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

Overview
Comment:Make sqlite3_shutdown() a no-op if the library is not initialized. (CVS 5364)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d725d3bbcef6a8093a246f8ef5b11bf690662393
User & Date: danielk1977 2008-07-08 12:02:35
Context
2008-07-08
12:07
Extra coverage tests for btree.c. (CVS 5365) check-in: 08334f60 user: danielk1977 tags: trunk
12:02
Make sqlite3_shutdown() a no-op if the library is not initialized. (CVS 5364) check-in: d725d3bb user: danielk1977 tags: trunk
10:19
Improve coverage of btree.c. (CVS 5363) check-in: f6d9cb83 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
126
127
128
129
130
131
132

133


134


135

136
137
138
139
140
141
142
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.469 2008/07/07 19:52:10 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif
................................................................................
** while any part of SQLite is otherwise in use in any thread.  This
** routine is not threadsafe.  Not by a long shot.
*/
int sqlite3_shutdown(void){
  sqlite3_mutex_free(sqlite3Config.pInitMutex);
  sqlite3Config.pInitMutex = 0;
  sqlite3Config.isMallocInit = 0;

  sqlite3_os_end();


  sqlite3MallocEnd();


  sqlite3MutexEnd();

  sqlite3Config.isInit = 0;
  return SQLITE_OK;
}

/*
** This API allows applications to modify the global configuration of
** the SQLite library at run-time.







|







 







>
|
>
>
|
>
>
|
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.470 2008/07/08 12:02:35 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif
................................................................................
** while any part of SQLite is otherwise in use in any thread.  This
** routine is not threadsafe.  Not by a long shot.
*/
int sqlite3_shutdown(void){
  sqlite3_mutex_free(sqlite3Config.pInitMutex);
  sqlite3Config.pInitMutex = 0;
  sqlite3Config.isMallocInit = 0;
  if( sqlite3Config.isInit ){
    sqlite3_os_end();
  }
  if( sqlite3Config.m.xShutdown ){
    sqlite3MallocEnd();
  }
  if( sqlite3Config.mutex.xMutexEnd ){
    sqlite3MutexEnd();
  }
  sqlite3Config.isInit = 0;
  return SQLITE_OK;
}

/*
** This API allows applications to modify the global configuration of
** the SQLite library at run-time.