diff options
author | drh <drh@noemail.net> | 2018-07-24 22:02:12 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-07-24 22:02:12 +0000 |
commit | ba968dbfe7f1e7cc227c4b5952c9868f7f036bad (patch) | |
tree | 71f1f5ba3f1ace7f8fe86edce1c62c4a86d46c9e /src/vdbeaux.c | |
parent | 5a193dd8e609c2cd6827fbb3d9cc4ff7c66e0c25 (diff) | |
download | sqlite-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.c | 12 |
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; } } |