aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-04-02 16:28:52 +0000
committerdrh <drh@noemail.net>2011-04-02 16:28:52 +0000
commitc7792fa052499f7ff04adaa787a957eb3f6b5e47 (patch)
tree534a9364433a4b5cfa8c6366c4107e492b08365e /src/main.c
parent6c15487b7edf747b7b08cf6eb311f503adb0cd6a (diff)
downloadsqlite-c7792fa052499f7ff04adaa787a957eb3f6b5e47.tar.gz
sqlite-c7792fa052499f7ff04adaa787a957eb3f6b5e47.zip
Begin a series of changes designed to reduce the scope and frequency of
invalidating schemas. Design goals are that the internal schema should never be deleted out from under a prepared statement that is running and that all prepared statements should be expired if the schema is invalidated. At the same time, minimize the number of schema invalidations. This change merely revises the sqlite3ResetInternalSchema() function to use -1 as the wildcard for "all" rather than 0, so that we can reset the main schema independently of all the others. FossilOrigin-Name: 6a8ad6e31e0d2b8a5ace38faf0efd805155ee5f3
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 03097498c..ca862edc7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -687,7 +687,7 @@ int sqlite3_close(sqlite3 *db){
}
sqlite3_mutex_enter(db->mutex);
- sqlite3ResetInternalSchema(db, 0);
+ sqlite3ResetInternalSchema(db, -1);
/* If a transaction is open, the ResetInternalSchema() call above
** will not have called the xDisconnect() method on any virtual
@@ -730,7 +730,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 +821,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. */