diff options
author | drh <drh@noemail.net> | 2011-04-05 13:12:28 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-04-05 13:12:28 +0000 |
commit | 959b6a95ee5f398ce3db3b3199f4e579e621e43c (patch) | |
tree | 732ad37cd655bc396a327918c6b60639937e6708 /src/main.c | |
parent | 8d129422ed9a04bac684864ba127fa6278cc7513 (diff) | |
parent | 03faf63b57a76c925c0e46e8bcb3b86cfe098590 (diff) | |
download | sqlite-959b6a95ee5f398ce3db3b3199f4e579e621e43c.tar.gz sqlite-959b6a95ee5f398ce3db3b3199f4e579e621e43c.zip |
Merge the scheme-parse-refactor changes into trunk: (1) added
sqlite3SchemaMutexHeld() asserts, (2) Use -1 instead of 0 to mean
"all" in sqlite3ResetInternalSchema(), and other cosmetic changes.
FossilOrigin-Name: 5db4511d8a77b74be3503a7c34257ef6b07541f5
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c index 03097498c..e05c3885b 100644 --- a/src/main.c +++ b/src/main.c @@ -687,7 +687,8 @@ int sqlite3_close(sqlite3 *db){ } sqlite3_mutex_enter(db->mutex); - sqlite3ResetInternalSchema(db, 0); + /* Force xDestroy calls on all virtual tables */ + sqlite3ResetInternalSchema(db, -1); /* If a transaction is open, the ResetInternalSchema() call above ** will not have called the xDisconnect() method on any virtual @@ -730,7 +731,7 @@ int sqlite3_close(sqlite3 *db){ } } } - sqlite3ResetInternalSchema(db, 0); + sqlite3ResetInternalSchema(db, -1); /* Tell the code in notify.c that the connection no longer holds any ** locks and does not require any further unlock-notify callbacks. @@ -821,7 +822,7 @@ void sqlite3RollbackAll(sqlite3 *db){ if( db->flags&SQLITE_InternChanges ){ sqlite3ExpirePreparedStatements(db); - sqlite3ResetInternalSchema(db, 0); + sqlite3ResetInternalSchema(db, -1); } /* Any deferred constraint violations have now been resolved. */ |