John Firebaugh <john_firebaugh-C69GFqk2Qz/[EMAIL PROTECTED]>
wrote:
With SQLite 3.5.1, when a connection is shared between two threads, if
the second thread attempts to begin a transaction while a transaction
is
in progress on the first thread, sqlite3_exec( "begin transaction" )
returns SQLITE_ERROR with a status message "cannot start a transaction
within a transaction".

Is this expected behavior?

Yes. This has nothing to do with threads - you can't do this on a single thread either. SQLite doesn't support nested transactions.

I would have expected the "no transaction
nesting" restriction to be enforced per-thread, not per-connection.

And what made you believe so? How is supporting nested transactions in multiple threads any easier than supporting them in a single thread?

Anyway, if you want this behavior, why don't you just have each thread open its own connection?

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to