SQLite Forum

facing issue from sqlite3_step()
There is no isolation between threads, only between connections.  So if you transmute the database then that transmutation is visible to other "statements" executing on the same connection.

The results of transforming a table on the same connection as the one you are using to read that very same table is undefined, so whatever happens is the expected and intended result.

If you do not want the update(s) to affect the select(s), you must do those operations on separate connections.

If you are using non-WAL journalling you will also have to contend with ensuring that the updates will (a) fit in the cache and (b) not committed until the select is finished, otherwise you will get an "error" that the database is busy when attempting to commit the changes.