SQLite Forum

When using sqlite3_step(stmt) inside a transaction my busy-handler is not being called
Login
Thank you for this relply.

Per your points:

> What SQLite cares about is that there are multiple connections.

Yes, there are multiple-connections per each thread.


> And what would your busy handler do? In case of a deadlock, waiting would not help

My busy handler will always return 1 (keep on trying), but every 30 repetitive retries it will sleep 10 ms.


> A deadlock happens when two read-only transactions want to upgrade to read/write

This is very helpfull information. 

I understand the lock, but why deadlock? 
Wouldn't calling my busy handler resolve this lock?

In any case - if my busy handler is not being called it means that I cannot use this DEFFERED transaction, and alwys alternate to IMMEDIATE transaction...

**Are we aware of any more such cases where `sqlite` is not calling the busy handler?**

Thank you again for this reply