|
bool | trx_is_recv (const trx_t *trx) |
| Determines if this transaction is rolling back an incomplete transaction in crash recovery. More...
|
|
trx_savept_t | trx_savept_take (trx_t *trx) |
| Returns a transaction savepoint taken at this point in time. More...
|
|
trx_undo_rec_t * | trx_roll_pop_top_rec_of_trx (trx_t *trx, undo_no_t limit, roll_ptr_t *roll_ptr, mem_heap_t *heap) |
| Get next undo log record from redo and noredo rollback segments. More...
|
|
void | trx_rollback_or_clean_recovered (bool all) |
| Rollback or clean up any incomplete transactions which were encountered in crash recovery. More...
|
|
void | trx_recovery_rollback_thread () |
| Rollback or clean up any incomplete transactions which were encountered in crash recovery. More...
|
|
roll_node_t * | roll_node_create (mem_heap_t *heap) |
| Creates a rollback command node struct. More...
|
|
que_thr_t * | trx_rollback_step (que_thr_t *thr) |
| Performs an execution step for a rollback command node in a query graph. More...
|
|
dberr_t | trx_rollback_for_mysql (trx_t *trx) |
| Rollback a transaction used in MySQL. More...
|
|
dberr_t | trx_rollback_last_sql_stat_for_mysql (trx_t *trx) |
| Rollback the latest SQL statement for MySQL. More...
|
|
dberr_t | trx_rollback_to_savepoint (trx_t *trx, trx_savept_t *savept) |
| Rollback a transaction to a given savepoint or do a complete rollback. More...
|
|
dberr_t | trx_rollback_to_savepoint_for_mysql (trx_t *trx, const char *savepoint_name, int64_t *mysql_binlog_cache_pos) |
| Rolls back a transaction back to a named savepoint. More...
|
|
dberr_t | trx_savepoint_for_mysql (trx_t *trx, const char *savepoint_name, int64_t binlog_cache_pos) |
| Creates a named savepoint. More...
|
|
dberr_t | trx_release_savepoint_for_mysql (trx_t *trx, const char *savepoint_name) |
| Releases a named savepoint. More...
|
|
void | trx_roll_savepoints_free (trx_t *trx, trx_named_savept_t *savep) |
| Frees savepoint structs starting from savep. More...
|
|
Transaction rollback.
Created 3/26/1996 Heikki Tuuri
void trx_rollback_or_clean_recovered |
( |
bool |
all | ) |
|
Rollback or clean up any incomplete transactions which were encountered in crash recovery.
If the transaction already was committed, then we clean up a possible insert undo log. If the transaction was not yet committed, then we roll it back. in: false=roll back dictionary transactions; true=roll back all non-PREPARED transactions
If the transaction already was committed, then we clean up a possible insert undo log. If the transaction was not yet committed, then we roll it back.
- Parameters
-
all | in: false=roll back dictionary transactions; true=roll back all non-PREPARED transactions |
dberr_t trx_rollback_to_savepoint_for_mysql |
( |
trx_t * |
trx, |
|
|
const char * |
savepoint_name, |
|
|
int64_t * |
mysql_binlog_cache_pos |
|
) |
| |
Rolls back a transaction back to a named savepoint.
Modifications after the savepoint are undone but InnoDB does NOT release the corresponding locks which are stored in memory. If a lock is 'implicit', that is, a new inserted row holds a lock where the lock information is carried by the trx id stored in the row, these locks are naturally released in the rollback. Savepoints which were set after this savepoint are deleted.
- Returns
- if no savepoint of the name found then DB_NO_SAVEPOINT, otherwise DB_SUCCESS out: the MySQL binlog cache position corresponding to this savepoint; MySQL needs this information to remove the binlog entries of the queries executed after the savepoint
Modifications after the savepoint are undone but InnoDB does NOT release the corresponding locks which are stored in memory. If a lock is 'implicit', that is, a new inserted row holds a lock where the lock information is carried by the trx id stored in the row, these locks are naturally released in the rollback. Savepoints which were set after this savepoint are deleted.
- Returns
- if no savepoint of the name found then DB_NO_SAVEPOINT, otherwise DB_SUCCESS
- Parameters
-
trx | in: transaction handle |
savepoint_name | in: savepoint name |
mysql_binlog_cache_pos | out: the MySQL binlog cache position corresponding to this savepoint; MySQL needs this information to remove the binlog entries of the queries executed after the savepoint |
dberr_t trx_savepoint_for_mysql |
( |
trx_t * |
trx, |
|
|
const char * |
savepoint_name, |
|
|
int64_t |
binlog_cache_pos |
|
) |
| |
Creates a named savepoint.
If the transaction is not yet started, starts it. If there is already a savepoint of the same name, this call erases that old savepoint and replaces it with a new. Savepoints are deleted in a transaction commit or rollback.
- Returns
- always DB_SUCCESS in: MySQL binlog cache position corresponding to this connection at the time of the savepoint
If the transaction is not yet started, starts it. If there is already a savepoint of the same name, this call erases that old savepoint and replaces it with a new. Savepoints are deleted in a transaction commit or rollback.
- Returns
- always DB_SUCCESS
- Parameters
-
trx | in: transaction handle |
savepoint_name | in: savepoint name |
binlog_cache_pos | in: MySQL binlog cache position corresponding to this connection at the time of the savepoint |