On 9/13/2012 4:14 PM, Petite Abeille wrote:
On Sep 13, 2012, at 9:30 PM, Igor Tandetnik <itandet...@mvps.org> wrote:

If records are added by the same transaction that runs the SELECT statements, 
then they may or may not be observed (imagine for example that the statement 
has an ORDER BY clause, and a new row is inserted that comes before the row 
that the statement is currently positioned at).

Hmmmm… doesn't SQLite provide read consistency by default (i.e. isolation level 
SERIALIZABLE [1])?

Yes it does. Note that the concept of "isolation level" applies to different transactions, not to statements executed within the same transaction. Within a single transaction, you certainly want to see changes in SELECT that you've just made with INSERT or UPDATE.

In other words, a select should only ever see what existed at the beginning of 
the query, and that is that.

Again, the concept of isolation level applies to transactions, not to individual queries.

Or perhaps are you talking about 'dirty reads', aka 'read uncommitted' [2]?

No I do not. This allows one connection to observe changes made by another, under certain circumstances. I'm talking about a connection observing changes it itself made.

Or something else altogether?

Yes.
--
Igor Tandetnik

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

Reply via email to