1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-02 05:54:29 +03:00

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
This commit is contained in:
drh
2018-07-24 22:02:12 +00:00
parent 5a193dd8e6
commit ba968dbfe7
11 changed files with 85 additions and 33 deletions

View File

@@ -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;
}
}