aboutsummaryrefslogtreecommitdiff
path: root/src/auth.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-08-01 22:48:45 +0000
committerdrh <drh@noemail.net>2019-08-01 22:48:45 +0000
commitd744ee0b50e64348a0ba605eb8270cd2363e8dd3 (patch)
tree75e1f215b07c4a5cb8df09b8af0bab369fc21a67 /src/auth.c
parent401593e348028071e0fd59753df046216a137ef9 (diff)
downloadsqlite-d744ee0b50e64348a0ba605eb8270cd2363e8dd3.tar.gz
sqlite-d744ee0b50e64348a0ba605eb8270cd2363e8dd3.zip
The sqlite3_set_authorizer() interface should only expire prepared statements
when it is setting a new authorizer, not when clearing the authorizer. And statements that are running when sqlite3_set_authorizer() is invoked should be allowed to continue running to completion. FossilOrigin-Name: 961e2f08c35238bcb1d32430d16451a96807b2c4bbb194ee621128dd09cd3981
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth.c b/src/auth.c
index 6fcdce251..40673d5ea 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -78,7 +78,7 @@ int sqlite3_set_authorizer(
sqlite3_mutex_enter(db->mutex);
db->xAuth = (sqlite3_xauth)xAuth;
db->pAuthArg = pArg;
- sqlite3ExpirePreparedStatements(db, 0);
+ if( db->xAuth ) sqlite3ExpirePreparedStatements(db, 1);
sqlite3_mutex_leave(db->mutex);
return SQLITE_OK;
}