>Suppose ROLLBACK does not cancel the BEGIN, can a programmer reliably >issue more SQL commands, including another ROLLBACK ? Will SQLite >continue to react correctly to other ROLLBACKs, and to SQL commands >which result in "(516) SQLITE_ABORT_ROLLBACK".
A successful ROLLBACK on a transaction discards all changes that were made during the transaction (rolls back to the state at the time the transaction began), and ends the transaction. It does not "cancel" the "BEGIN", it merely exits the transaction and discards changes made during the transaction. Since the BEGIN occurred in the past, it cannot be "cancelled" ... Full Stop End of Line. However, a ROLLBACK command which produces the error "(516) SQLITE_ABORT_ROLLBACK" would indicate that the ROLLBACK was NOT PERFORMED due to an error. Therefore the transaction is STILL IN EFFECT and has neither been COMMITed nor ROLLBACKed. Once the programming error which prevented the rollback is cleared the ROLLBACK command can be retried. Once a transaction is opened it remains in effect until ROLLBACK or COMMIT complete successfuly (or the heat death of the universe, whichever shall come first). Note that this discussion does not include "fatal errors" which may occur within the context of a transaction that abort the transaction itself. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users