Subject Re: [firebird-support] implementation questions -- how does firebird rollback a partially-executed statement?
Author Ann W. Harrison
unordained wrote:
> ...such that cast() will fail eventually, how does firebird go about
> ignoring its changes "so far" when it spits out a conversion error?

The SQL Standard dictates that update, insert, and delete statements
that affect multiple rows, procedures, and triggers are all "atomic" -
all changes succeed or fail. Firebird meets that requirement by keeping
a undo log - a list of records affected by the statement with the
information necessary to undo the action if the statement (or procedure
or trigger) fails. The same mechanism also handles rolling back to a
savepoint. And yes, there can be several different levels of undo log
and the mechanism handles cases where the same record is changed many
times at different levels in nested operations.