~drizzle-trunk/drizzle/development

1887.3.2 by Brian Aker
Extended documentation.
1
SAVEPOINT
2
=========
3
1994.4.2 by Marisa Plumb
modified transaction docs
4
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. ::
5
6
	SAVEPOINT identifier
7
1994.5.13 by Stewart Smith
add savepoint example
8
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:
9
2165.2.5 by Andrew Hutchings
Make fixes to temporal docs
10
.. code-block:: mysql
11
1994.5.13 by Stewart Smith
add savepoint example
12
     SAVEPOINT A;
13
     INSERT INTO t1 values (1);
14
     SAVEPOINT A;
15
     INSERT INTO t1 values (2);
16
     ROLLBACK TO SAVEPOINT A;
17
18
Will only roll back the second insert statement.