SQLite Forum

Apparent bug in ALTER TABLE
> It introduced an unnecessary and undocumented interaction between processes working in entirely different parts of the database. Suppose for example that process A is doing the sequence described in section 5 of the ALTER TABLE documentation on page https://www.sqlite.org/lang_altertable.html. Between steps 6 and 7 any view that referenced table X now refers to a nonexistent table. If process B (perhaps belonging to a different user) attempts to do an ALTER TABLE in another part of the database at this point, it will get an error.

Can this happen at all? Imho the 12-step recipe has to be executed within a transaction, so process B should not have the chance to do anything between steps 6 and 7 - only before step 1 or after step 12.