Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Normand Mongeau
Yep OK. I stand corrected. BTW thanks for your help. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: October-30-13 12:16 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Problem with SQLITE_BUSY The

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Igor Tandetnik
. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: October-30-13 12:07 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Problem with SQLITE_BUSY On 30 Oct 2013, at 4:03pm, Normand Mongeau wrote: Well

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Normand Mongeau
...@sqlite.org] On Behalf Of Simon Slavin Sent: October-30-13 12:07 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Problem with SQLITE_BUSY On 30 Oct 2013, at 4:03pm, Normand Mongeau wrote: > Well finally found the problem: a forgotten sqlite3_finalize() call. >

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Simon Slavin
On 30 Oct 2013, at 4:03pm, Normand Mongeau wrote: > Well finally found the problem: a forgotten sqlite3_finalize() call. > > Very disturbing, I'd expect leakage, not the results I was seeing. SQLite has to keep the state of your SELECT available until you tell it you're done with that SELECT.

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Normand Mongeau
tober-30-13 9:51 AM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] Problem with SQLITE_BUSY Using the straight C API of SQLite. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Oct

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Normand Mongeau
Using the straight C API of SQLite. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: October-30-13 9:39 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Problem with SQLITE_BUSY On 30 Oct

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Simon Slavin
On 30 Oct 2013, at 1:00pm, Normand Mongeau wrote: > Could this be related to this: in A, the database connection is created in > the main program, but is passed down to a dll that loads another dll that > uses the connection to do the writes. Maybe the dll should open its own > connection? Are

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Normand Mongeau
n...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: October-29-13 6:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Problem with SQLITE_BUSY You haven't explained what the second connection in A is doing. My educated guess is, the two connections enter i

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-30 Thread Simon Slavin
On 30 Oct 2013, at 2:32am, Normand Mongeau wrote: > Odd thing is that although I do have a 10 second timeout as soon as C goes > into a begin transaction A receives the SQLITE_BUSY error, in other words I > don't see any 10 second delay. > > I'll try increasing the timeout. No need. You've al

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-29 Thread Igor Tandetnik
On 10/29/2013 10:32 PM, Normand Mongeau wrote: Hmm really? Odd thing is that although I do have a 10 second timeout as soon as C goes into a begin transaction A receives the SQLITE_BUSY error, in other words I don't see any 10 second delay. This, too, is consistent with my diagnosis. When SQLi

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-29 Thread Normand Mongeau
sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: October-29-13 8:48 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Problem with SQLITE_BUSY On 29 Oct 2013, at 10:26pm, Normand Mongeau wrote: > I have a situation where I always run into a

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-29 Thread Normand Mongeau
to:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: October-29-13 6:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Problem with SQLITE_BUSY You haven't explained what the second connection in A is doing. My educated guess is, the two connections enter into a deadlock. This

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-29 Thread Simon Slavin
On 29 Oct 2013, at 10:26pm, Normand Mongeau wrote: > I have a situation where I always run into an SQLITE_BUSY error. Set your timeout to something very large (a million milliseconds ?) and see if the problem just turns into unexpected delays instead of errors. You can set timeout using eit

Re: [sqlite] Problem with SQLITE_BUSY

2013-10-29 Thread Igor Tandetnik
You haven't explained what the second connection in A is doing. My educated guess is, the two connections enter into a deadlock. This is possible when at least one connection starts as a reader and later attempts to write (the other could be a straight writer). The scenario goes like this: the

Re: [sqlite] problem with SQLITE_BUSY

2009-07-05 Thread Wenton Thomas
==0 ); Dan. > > > > > > > From: Igor Tandetnik > To: sqlite-users@sqlite.org > Sent: Saturday, July 4, 2009 8:44:52 PM > Subject: Re: [sqlite] problem with SQLITE_BUSY > > Wenton Thomas wrote: >> Now in my system I used sqlite

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Dan
Dan. > > > > > > > From: Igor Tandetnik > To: sqlite-users@sqlite.org > Sent: Saturday, July 4, 2009 8:44:52 PM > Subject: Re: [sqlite] problem with SQLITE_BUSY > > Wenton Thomas wrote: >> Now in my system I used sqlite to manage 2 database file A.db a

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Wenton Thomas
I use prepare statements, and I am sure I finalize all of them. From: Igor Tandetnik To: sqlite-users@sqlite.org Sent: Saturday, July 4, 2009 8:44:52 PM Subject: Re: [sqlite] problem with SQLITE_BUSY Wenton Thomas wrote: > Now in my system I used sql

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Igor Tandetnik
Wenton Thomas wrote: > Now in my system I used sqlite to manage 2 database file A.db and > B.db, and each has a connection handle cA, cB. My operation perform > like this: > > > sqlite3_exec( select records from cA) > sqlite3_exec("begin transaction"); > insert all records into cB; > sqlite3_e

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Wenton Thomas
A.db. The functon get_record_func() execute "sqlite3_exec( select records from cA)". From: "freshie2004-sql...@yahoo.com.au" To: General Discussion of SQLite Database Sent: Saturday, July 4, 2009 5:57:41 PM Subject: Re: [sqlite] proble

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread freshie2004-sqlite
What about using only one connection and the ATTACH statement: http://www.sqlite.org/lang_attach.html Also, see the select-stmt form of the INSERT statement: http://www.sqlite.org/lang_insert.html Something like... sqlite3_open database B ATTACH DATABASE A.db AS dbA BEGIN INSERT INTO main.