Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Jay Kreibich
On Jan 7, 2014, at 4:13 AM, Woody Wu wrote: > Thanks for the clear guide. _busy_timeout is easier to use. By the way, i > want confirm that if i am not in an explicit transaction, i can simply redo > the _step() invoking, right? No. You executed a statement.

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Yuriy Kaminskiy
Woody Wu wrote: > Hi, Simon > > On 7 January 2014 19:32, Simon Slavin wrote: > >> On 7 Jan 2014, at 10:13am, Woody Wu wrote: >> >>> Thanks for the clear guide. _busy_timeout is easier to use. By the >>> way, i want confirm that if i am not in an

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 2:26pm, Woody Wu wrote: > What means "using _timeout()" properly? The manual says, _timeout() can > still make _step() returns SQLITE_BUSY or SQLITE_IOERR_BLOCKED if the user > provided timeout value eventually accumulated. For example, if I set >

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Hi, Simon What means "using _timeout()" properly? The manual says, _timeout() can still make _step() returns SQLITE_BUSY or SQLITE_IOERR_BLOCKED if the user provided timeout value eventually accumulated. For example, if I set _timeout() to 3000ms, but after that time, the table I was trying to

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 10:13am, Woody Wu wrote: > Thanks for the clear guide. _busy_timeout is easier to use. By the way, i > want confirm that if i am not in an explicit transaction, i can simply redo > the _step() invoking, right? However, if you are using _timeout()

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Thanks for the clear guide. _busy_timeout is easier to use. By the way, i want confirm that if i am not in an explicit transaction, i can simply redo the _step() invoking, right? On Tuesday, 7 January 2014, Simon Slavin wrote: > > On 7 Jan 2014, at 8:50am, Woody Wu

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 8:50am, Woody Wu wrote: > Why I cannot just > sleep for a while > and redo the sqlite3_step()? If you want to sleep for a while then try _step() again you can get the same result without any programming. Simply set sqlite3_busy_timeout() to the time

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Clemens Ladisch
Woody Wu wrote: > The manual says that it should to rollback after sqlite3_step() returns > SQLITE_BUSY as long as > the current statment is in a transaction. Is this true? Yes. If you have a transaction, you must _eventually_ commit or rollback. > Why I cannot just sleep for a while and redo

[sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Hi, The manual says that it should to rollback after sqlite3_step() returns SQLITE_BUSY as long as the current statment is in a transaction. Is this true? Why I cannot just sleep for a while and redo the sqlite3_step()? Thanks in advance. -- Life is the only flaw in an otherwise perfect