[sqlite] Why skip invoking busy handler while pBt->inTransaction!=TRANS_NONE

2016-02-24 Thread Dan Kennedy
On 02/24/2016 08:32 PM, sanhua.zh wrote: > In the source code of SQLite, btree.c, sqlite3BtreeBeginTrans function, > The code > > > do { >/* Call lockBtree() until either pBt-pPage1 is populated or >** lockBtree() returns something other than SQLITE_OK. lockBtree() >** may return SQLI

[sqlite] Why skip invoking busy handler while pBt->inTransaction!=TRANS_NONE

2016-02-24 Thread sanhua.zh
In the source code of SQLite, btree.c, sqlite3BtreeBeginTrans function, The code do { /* Call lockBtree() until either pBt-pPage1 is populated or ** lockBtree() returns something other than SQLITE_OK. lockBtree() ** may return SQLITE_OK but leave pBt-pPage1 set to 0 if after ** reading p

[sqlite] Why skip invoking busy handler while pBt->inTransaction!=TRANS_NONE

2016-02-24 Thread Igor Tandetnik
On 2/24/2016 8:32 AM, sanhua.zh wrote: > So it?s the question I confused. Why SQLite skip invoking busy handler while > it's in TRANS (either read or write) ? Deadlock detection, I would guess. See https://www.sqlite.org/c3ref/busy_handler.html , look for the paragraph that mentions "deadlock".