Re: [sqlite] Re: Re: sqlite3_busy_timeout

2005-09-23 Thread Doug Hanks
Thanks, Igor.

On 9/23/05, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Doug Hanks wrote:
> > Let me see if I understand this correctly:
> >
> > So calling sqlite3_busy_time() allows you sleep for a max of N ms if
> > the database is busy.  Basically this function polls for you?
>
> This is one way to describe it.
>
> > When
> > the database is free, it will return with SQLITE_DONE or SQLITE_ROW?
>
> Not it, but whatever function you called to initiate the request -
> sqlite3_step, sqlite3_execute. You only call sqlite3_busy_timeout once
> to set up the timeout on the database handle, and it affects all future
> operations.
>
> > What happens if the database never gets free?  Will
> > sqlite3_busy_timeout() just return SQLITE_BUSY?
>
> Again, not sqlite3_busy_timeout, but the function that initiated the
> request. Yes, it will wait for the specified time, and if it still
> cannot proceed, it'll fail with SQLITE_BUSY.
>
> Igor Tandetnik
>
>


--
- Doug Hanks = dhanks(at)gmail(dot)com


[sqlite] Re: Re: sqlite3_busy_timeout

2005-09-23 Thread Igor Tandetnik

Doug Hanks wrote:

Let me see if I understand this correctly:

So calling sqlite3_busy_time() allows you sleep for a max of N ms if
the database is busy.  Basically this function polls for you?


This is one way to describe it.


When
the database is free, it will return with SQLITE_DONE or SQLITE_ROW?


Not it, but whatever function you called to initiate the request - 
sqlite3_step, sqlite3_execute. You only call sqlite3_busy_timeout once 
to set up the timeout on the database handle, and it affects all future 
operations.



What happens if the database never gets free?  Will
sqlite3_busy_timeout() just return SQLITE_BUSY?


Again, not sqlite3_busy_timeout, but the function that initiated the 
request. Yes, it will wait for the specified time, and if it still 
cannot proceed, it'll fail with SQLITE_BUSY.


Igor Tandetnik