mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Defer schema resets when the query planner is running.
Proposed fix for ticket [be436a7f4587ce517]. FossilOrigin-Name: a7bc7752ba0266684f5317e424a4ee9add4af002272082183519e708ab9ffc79
This commit is contained in:
@@ -686,7 +686,8 @@ static int sqlite3LockAndPrepare(
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
sqlite3BtreeEnterAll(db);
|
||||
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
|
||||
if( rc==SQLITE_SCHEMA ){
|
||||
if( rc==SQLITE_SCHEMA && db->nSchemaLock==0 ){
|
||||
sqlite3ResetOneSchema(db, -1);
|
||||
sqlite3_finalize(*ppStmt);
|
||||
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user