On Thu, Sep 28, 2017 at 1:30 PM, Simon Slavin <slav...@bigfraud.org> wrote:

>
>
> On 28 Sep 2017, at 6:16pm, pisymbol . <pisym...@gmail.com> wrote:
>
> > So even with full mutex, if I have thread 1 issue a "BEGIN" and it starts
> > processing, and another thread 2 issues a "BEGIN" somewhere in between
> > that, the other thread will just flat out fail because a transaction has
> > already started for thread 1. Is that correct?
>
> Correct.  Connections are the way into SQLite.  Because both threads are
> using the same connection, SQLite thinks they’re part of the same effort.
> So as far as SQLite is concerned, the two threads are supplying SQL
> commands for the same transaction.
>
> As far as SQLite is concerned, you have one connection which executed
> BEGIN and then executed BEGIN again without having ended the first
> transaction.
>

Then I understand why my error occurred. This is a bummer. I will have to
readjust.


>
> On 28 Sep 2017, at 6:23pm, pisymbol . <pisym...@gmail.com> wrote:
>
> > The follow-up to this is what is the purpose of full mutex mode and when
> > should it be used over no mutex mode?
>
> The mutex is useful when SQLite can tell that your commands are actually
> part of two separate efforts.  i.e. when you’re using two different
> connections.
>
>
If you are using two different connections, then they both have to be
opened with full mutex and then SQLite will serial accordingly. Is that
right?

-aps
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to