Hello all,

> Oh, I completely forgot that people can do that. So, Robert, you case
> is exactly the case I was talking about. As Simon said your SELECT
> opens read-only transaction and then as you issue your first UPDATE
> this transaction have to be converted to writing one. This is a call
> for problems. So you better to issue "BEGIN IMMEDIATE" before you
> execute your SELECT statement.
> BTW, I hope you don't change the table you selected in this scenario?

I'm not sure right now, but I think I've done that every now and then.
With a bad feeling. Instinctively I'd rather first SELECT, store the
results, finalize the SELECT statement and then get to work on its
result using the stored data. It's just that without intermediate
storage it's a bit easier (no need to do any ressource management),
and I've found nothing in the docs that says I shouldn't do that.

sqlite-users mailing list

Reply via email to