/ Check-in [6f481ceb]
Login

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

Overview
Comment:Remove a redundant test from sqlite3_shutdown(). (CVS 6528)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6f481ceb503c7df74d9417a5a7f019ff56261ea8
User & Date: drh 2009-04-21 12:02:56
Context
2009-04-21
15:05
New comments and minor refactoring of rowhash.c. (CVS 6529) check-in: b8cb4f3e user: drh tags: trunk
12:02
Remove a redundant test from sqlite3_shutdown(). (CVS 6528) check-in: 6f481ceb user: drh tags: trunk
09:02
Attempt to optimize virtual table queries with 'OR' expressions in the WHERE clause. (CVS 6527) check-in: f61e4cd9 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
...
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
**
*************************************************************************
** 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.538 2009/04/19 12:23:58 drh Exp $
*/
#include "sqliteInt.h"

#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif
#ifdef SQLITE_ENABLE_RTREE
................................................................................
** on when SQLite is already shut down.  If SQLite is already shut down
** when this routine is invoked, then this routine is a harmless no-op.
*/
int sqlite3_shutdown(void){
  if( sqlite3GlobalConfig.isInit ){
    sqlite3GlobalConfig.isMallocInit = 0;
    sqlite3PcacheShutdown();
    if( sqlite3GlobalConfig.isInit ){
      sqlite3_os_end();
    }
    sqlite3_reset_auto_extension();
    sqlite3MallocEnd();
    sqlite3MutexEnd();
    sqlite3GlobalConfig.isInit = 0;
  }
  return SQLITE_OK;
}







|







 







<
|
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
217
218
219
220
221
222
223

224

225
226
227
228
229
230
231
**
*************************************************************************
** 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.539 2009/04/21 12:02:56 drh Exp $
*/
#include "sqliteInt.h"

#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif
#ifdef SQLITE_ENABLE_RTREE
................................................................................
** on when SQLite is already shut down.  If SQLite is already shut down
** when this routine is invoked, then this routine is a harmless no-op.
*/
int sqlite3_shutdown(void){
  if( sqlite3GlobalConfig.isInit ){
    sqlite3GlobalConfig.isMallocInit = 0;
    sqlite3PcacheShutdown();

    sqlite3_os_end();

    sqlite3_reset_auto_extension();
    sqlite3MallocEnd();
    sqlite3MutexEnd();
    sqlite3GlobalConfig.isInit = 0;
  }
  return SQLITE_OK;
}