aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-07-24 22:02:12 +0000
committerdrh <drh@noemail.net>2018-07-24 22:02:12 +0000
commitba968dbfe7f1e7cc227c4b5952c9868f7f036bad (patch)
tree71f1f5ba3f1ace7f8fe86edce1c62c4a86d46c9e /src/vdbeaux.c
parent5a193dd8e609c2cd6827fbb3d9cc4ff7c66e0c25 (diff)
downloadsqlite-ba968dbfe7f1e7cc227c4b5952c9868f7f036bad.tar.gz
sqlite-ba968dbfe7f1e7cc227c4b5952c9868f7f036bad.zip
Do not abort running queries due to a CREATE INDEX statement. Allow them
to run to completion before being reprepared. Fix for ticket [c694113e50321afdf9]. FossilOrigin-Name: 2bd593332da0aade467e7a4ee89e966aa6302f37540a2c5e23671f98a6cb599c
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index d6efead32..4550c7cf7 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -4659,11 +4659,19 @@ void sqlite3VdbeCountChanges(Vdbe *v){
** programs obsolete. Removing user-defined functions or collating
** sequences, or changing an authorization function are the types of
** things that make prepared statements obsolete.
+**
+** If iCode is 1, then expiration is advisory. The statement should
+** be reprepared before being restarted, but if it is already running
+** it is allowed to run to completion.
+**
+** Internally, this function just sets the Vdbe.expired flag on all
+** prepared statements. The flag is set to 1 for an immediate expiration
+** and set to 2 for an advisory expiration.
*/
-void sqlite3ExpirePreparedStatements(sqlite3 *db){
+void sqlite3ExpirePreparedStatements(sqlite3 *db, int iCode){
Vdbe *p;
for(p = db->pVdbe; p; p=p->pNext){
- p->expired = 1;
+ p->expired = iCode+1;
}
}