"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/docs/savepoints.rst" (6 May 2012, 697 Bytes) of package /linux/misc/old/drizzle-7.1.36-stable.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

SAVEPOINT

A savepoint is a marker inside a transaction that allows all commands that are executed after it was established to be rolled back. It effectively restores the transaction state to what it was at the time of the savepoint. :

SAVEPOINT identifier

This sets a savepoint that can be returned to in the current transaction. The "identifier" is the name given to the new savepoint. If the identifier has already been used then the original identifier is replaced. Example:

SAVEPOINT A;
INSERT INTO t1 values (1);
SAVEPOINT A;
INSERT INTO t1 values (2);
ROLLBACK TO SAVEPOINT A;

Will only roll back the second insert statement.