/ Check-in [af05c3ca]
Login

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

Overview
Comment:Reset the schema before checking for outstanding statements inside sqlite3_close() so that virtual tables will be disconnected. (CVS 3341)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: af05c3ca06163ef92ca1ca135302c00b7ddddabf
User & Date: drh 2006-07-30 20:50:45
Context
2006-08-08
13:51
Remove most static and global variables from a pure build. There are still a number of static and global variables used for testing. (CVS 3342) check-in: 76e4d418 user: drh tags: trunk
2006-07-30
20:50
Reset the schema before checking for outstanding statements inside sqlite3_close() so that virtual tables will be disconnected. (CVS 3341) check-in: af05c3ca user: drh tags: trunk
2006-07-28
20:16
Report any error which occurs in closing the database at exit. Free a couple of strings which were leaking. (CVS 3340) check-in: 47353f62 user: adamd 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
...
112
113
114
115
116
117
118

119
120
121
122
123
124
125
**
*************************************************************************
** 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.353 2006/07/26 01:39:30 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
  {
    extern void sqlite3SseCleanup(sqlite3*);
    sqlite3SseCleanup(db);
  }
#endif 

  /* If there are any outstanding VMs, return SQLITE_BUSY. */

  if( db->pVdbe ){
    sqlite3Error(db, SQLITE_BUSY, 
        "Unable to close due to unfinalised statements");
    return SQLITE_BUSY;
  }
  assert( !sqlite3SafetyCheck(db) );








|







 







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
**
*************************************************************************
** 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.354 2006/07/30 20:50:45 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
  {
    extern void sqlite3SseCleanup(sqlite3*);
    sqlite3SseCleanup(db);
  }
#endif 

  /* If there are any outstanding VMs, return SQLITE_BUSY. */
  sqlite3ResetInternalSchema(db, 0);
  if( db->pVdbe ){
    sqlite3Error(db, SQLITE_BUSY, 
        "Unable to close due to unfinalised statements");
    return SQLITE_BUSY;
  }
  assert( !sqlite3SafetyCheck(db) );