On Jul 21, 2008, at 5:46 AM, Daniel Önnerby wrote:

> Hi all!
>
> I usually set the sqlite3_busy_timeout to 10 seconds or something like
> that to make sure that my db isn't locked by any other connection  
> at the
> same time. This way I usually do not need to check for SQLITE_BUSY.
> Now I just tried out the sqlite3_enable_shared_cache and has enabled
> shared cache on 3 different threads connected to the same db.
> The funny thing is that now the bust_timeout seems to fail. Instead
> sqlite3_step will now return SQLITE_LOCKED every now and then (and  
> I can
> assure you that the timeout has not been reached).
>
> Is this a bug, or is this an undocumented expected behavior?

The busy-handler is never called when a shared-cache client cannot  
procede
because of a transaction, table or schema lock held by another client
of the same shared cache. See section 2 of this:

   http://www.sqlite.org/sharedcache.html

for details on those three types of locks.

Dan.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to