Yeah if I put BEGIN IMMEDIATE in thread1 as well, then it works, but as you
say I don't see why I need to do this. Perhaps the implicit transaction
which is created in my 1-line INSERT statement isn't an immediate
transaction??

Seems like there should be a flag or pragma or something to force all
transactions to be immediate.

-Dave


On 3/13/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
>
> Dave Brown <[EMAIL PROTECTED]> wrote:
> > Igor - ok I tried this, and now I am getting SQLITE_BUSY returned
> > when I try
> > to sqlite3_exec my "BEGIN IMMEDIATE" statement.  So I then put that
> > in a
> > do-while( rc == SQLITE_BUSY) loop, and now my first thread is getting
> > SQLITE_BUSY returned when it tries to execute the 1-line INSERT
> > statement
> > (without transaction).
>
> It should run the busy handler in this situation as far as I can tell -
> I have no idea why it might not.
>
> Does anything change if you use BEGIN IMMEDIATE for DB1 too?
>
> Note that when you don't explicitly start a transaction, one is started
> for you anyway as soon as you try to execute a statement, and is
> automatically committed when the statement completes. So it is incorrect
> to way that you run a statement without transaction.
>
> Igor Tandetnik
>
>

Reply via email to