DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) Savepoints

Info Catalog (mysql.info.gz) Implicit commit (mysql.info.gz) Transactional Commands (mysql.info.gz) LOCK TABLES
 
 13.4.4 `SAVEPOINT' and `ROLLBACK TO SAVEPOINT' Syntax
 -----------------------------------------------------
 
      SAVEPOINT identifier
      ROLLBACK TO SAVEPOINT identifier
 
 Starting from MySQL 4.0.14 and 4.1.1, `InnoDB' supports the SQL
 statements `SAVEPOINT' and `ROLLBACK TO SAVEPOINT'.
 
 The `SAVEPOINT' statement sets a named transaction savepoint with a name
 of `identifier'.  If the current transaction has a savepoint with the
 same name, the old savepoint is deleted and a new one is set.
 
 The `ROLLBACK TO SAVEPOINT' statement rolls back a transaction to the
 named savepoint.  Modifications that the current transaction made to
 rows after the savepoint was set are undone in the rollback, but
 `InnoDB' does _not_ release the row locks that were stored in memory
 after the savepoint.  (Note that for a new inserted row, the lock
 information is carried by the transaction ID stored in the row; the
 lock is not separately stored in memory. In this case, the row lock is
 released in the undo.)  Savepoints that were set at a later time than
 the named savepoint are deleted.
 
 If the statement returns the following error, it means that no
 savepoint with the specified name exists:
 
      ERROR 1181: Got error 153 during ROLLBACK
 
 All savepoints of the current transaction are deleted if you execute a
 `COMMIT', or a `ROLLBACK' that does not name a savepoint.
 
Info Catalog (mysql.info.gz) Implicit commit (mysql.info.gz) Transactional Commands (mysql.info.gz) LOCK TABLES
automatically generated byinfo2html