Sorry for answering my own email. I had a bit of a breakthrough. Apparently compiled selects sqlite3_prepare_v2 that live longer than the transaction are enough to prevent the transaction from commiting. Each thread has it's own connection to the DB.
With multiple threads, the order was: prepare_v2 prepare_v2 prepare_v2 Begin Exclusive... Insert Commit; sqlite3_finalize sqlite3_finalize sqlite3_finalize If I change the order to. Begin Exclusive... prepare_v2 prepare_v2 prepare_v2 Insert sqlite3_finalize sqlite3_finalize sqlite3_finalize Commit; I get no more errors. Example #1 never commits properly. I wrote a procedure to sleep and re-try the commit when the error and error message matched up and the commit was always locked out. It's possible it's a problem in my code but, I thought I'd ask. Teg. Friday, October 19, 2007, 1:18:25 AM, you wrote: T> Hi all, T> I have a multithreaded app using 3.5.1 latest on the site. T> I "BEGIN EXCLUSIVE TRANSACTION;" T> Add some data and then T> "COMMIT;" T> The COMMIT sometimes returns SQLITE_ERROR but, the error message is T> "Select still in progress". I was under the impression I was supposed T> to get a "SQLITE_BUSY" in this case and be allowed to retry until the T> commit actually happens. T> I'm using direct execution to BEGIN the transaction and the same to T> COMMIT T> nResult = sqlite3_exec T> ( T> m_pDb, T> pszQuery, T> NULL, T> NULL, T> &m_pszErrorMessage T> ); T> if( nResult == SQLITE_OK ) T> { T> break; T> } T> ..... T> Is there an update? Is this expected behavior? If I mutex the entire T> process, I get no errors but, the performance is terrible. T> Best regards, T> Teg mailto:[EMAIL PROTECTED] T> ----------------------------------------------------------------------------- T> To unsubscribe, send email to [EMAIL PROTECTED] T> ----------------------------------------------------------------------------- -- Best regards, Teg mailto:[EMAIL PROTECTED] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------