~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/savepoints.rst

  • Committer: Stewart Smith
  • Date: 2010-11-07 04:22:31 UTC
  • mto: (1911.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1912.
  • Revision ID: stewart@flamingspork.com-20101107042231-ola4sl7j0qvg58tz
fix ARCHIVE storage engine calling exit (lintian warning). Was because we were linking in libinternal into libazio, which links into archive plugin. Just link libinternal into the command line utilities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
SAVEPOINT
2
2
=========
3
3
 
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
 
 
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
 
 
10
 
.. code-block:: mysql
11
 
 
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.
 
4
SAVEPOINT identifier
 
5
 
 
6
Sets a savepoint that can be returned to in the current transaction. If the
 
7
identifier has already been used then the original identifier is replaced.