On Mon, Feb 06, 2012 at 07:46:18PM +0530, Sreekumar TP scratched on the wall: > well, if stmt1 is a write transaction, it would aquire an exclusive lock. > if stmt2 is a read transaction, it would fail acquiring a shared lock since > the exclusive lock is not released. . unless sqlite decides to 'downgrade' > the exclusive lock to a 'shared' lock.
You're running both statements through the same connection. They're using the same set of locks, just as if it were a single, explicit transaction. If a statement is run when there is no explicit transaction open, an automatic transaction is open. That transaction remains open until there are no outstanding statements. -j > Sreekumar > On Feb 6, 2012 7:07 PM, "Igor Tandetnik" <itandet...@mvps.org> wrote: > > > Sreekumar TP <sreekumar...@gmail.com> wrote: > > > Why is this treated as a a single transaction? > > > > Well, because that's how SQLite works. Why shouldn't it be? > > -- > > Igor Tandetnik > > > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users