Greetings!
I need to be able to interrupt a long-running query within a transaction. The
question is: is it possible that changes made previously in this transaction
will be affected?
Example pseudo-code:
1. BEGIN IMMEDIATE
2. INSERT INTO x (x) VALUES ('y');
3. SELECT long_running_query
4. *from another thread* interrupt SELECT via progress handler or
sqlite3_interrupt
5. // ignore interrupted return code
6. COMMIT
7. SELECT x FROM x WHERE x = 'y' (will it be there?)
When I run a simple example as described above, it works - the transaction is
not ruined by interrupt. On the other hand, this case is not covered in the
documentation; specs only say that "If the interrupted SQL operation is an
INSERT, UPDATE, or DELETE that is inside an explicit transaction, then the
entire transaction will be rolled back automatically".
So, is it safe to assume that "If the interrupted SQL operation is a SELECT
that is inside an explicit transaction, then the transaction is not affected"?
Thanks for your help!
Igor
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users