ROLLBACK TO SAVEPOINT
The ROLLBACK TO SAVEPOINT
statement specifies the name of a savepoint to which changes are to be rolled back.The effect is to roll back all changes made within the transaction, from the specified savepoint forward until the point when ROLLBACK TO SAVEPOINT
is requested.
ROLLBACK TO SAVEPOINT
performs the following operations:
-
Any database mutations performed since the savepoint was created are undone.User variables set with
RDB$SET_CONTEXT()
remain unchanged. -
Any savepoints that were created after the one named are destroyed.Savepoints earlier than the one named are preserved, along with the named savepoint itself.Repeated rollbacks to the same savepoint are thus allowed.
-
All implicit and explicit record locks that were acquired since the savepoint are released.Other transactions that have requested access to rows locked after the savepoint are not notified and will continue to wait until the transaction is committed or rolled back.Other transactions that have not already requested the rows can request and access the unlocked rows immediately.