On 5/27/16, Paul Medynski <[email protected]> wrote:
>
> begin transaction;
> ... Work A ...
> savepoint Foo;
> ... Work B ...
> savepoint Foo; <--- Allowed by #1
> ... Work C ...
> rollback to savepoint Foo; <--- Rolls back Work C, but leaves the
> innermost savepoint Foo active due
> to #2
>
> rollback to savepoint Foo; <--- Does nothing - I can no longer
> rollback past the innermost Foo
> without rolling back the entire
> transaction.
Foo is still on the stack twice. If you want to go back to the first
one, you have to "RELEASE" the second one:
RELEASE foo; -- equivalent to "ROLLBACK foo" since there have
been no changes
ROLLBACK TO foo;
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users