On 03/07/2018 07:44 PM, Nir wrote:

I tried to change a couple of my select queries to precompiled, meaning I
prepare them once and bind an int/string each time for performance gain. I
only reset and clear bindings before binding and executing my query and I
only finalize the statement when my app is closed.

I have a temp table that is created using the same table I query above but
only part of it, this table doesn't use precompiled statements but prepares
them each time. When I try to drop the temp table if exists my app locks and
I see that my sqlite log has the next error:
statement aborts at 12: [drop table if exists TEMP_TABLE_NAME;] database
table is locked6

is this a known issue? is there a workaround for this? i'm using sqlite
version 3.17.0.

You can't drop a table if there are any active readers - statement handles on which sqlite3_step() has been called more recently than sqlite3_reset(). Even if the active readers never touch the temp table.


sqlite-users mailing list

Reply via email to