Hello SQLite users, Hello Dr. Hipp, while doing updates from multiple threads, I'm only able to perform an update on one thread, all the other threads returning SQLITE_BUSY. This is ok: I've read the docs and it behaves as it should.
However, what I don't understand is the behavior of sqlite when I set a busy timeout. The documentation states: ** This routine sets a busy handler that sleeps for a while when a ** table is locked. The handler will sleep multiple times until ** at least "ms" milleseconds of sleeping have been done. After ** "ms" milleseconds of sleeping, the handler returns 0 which ** causes sqlite3_exec() to return SQLITE_BUSY. So my question is this: given two threads, T1 and T2 which try to do simultaneous updates from two separate threads, and T1 is beginning and commiting the UPDATE, shouldn't T2 try for x milliseconds (value specified in sqlite3_busy_timeout) before returning SQLITE_BUSY ? In v3.0.4, the result is that T2 returns immediately reporting SQLITE_BUSY, as if it is ignoring the busy timeout. Regards, George Ionescu