Remove roll_node_t::partial
The field roll_node_t::partial holds if and only if savept has been set. Make savept a pointer. trx_rollback_start(): Use the semantic type undo_no_t for roll_limit.
This commit is contained in:
parent
793bd3ee13
commit
4e9f8c9cc4
@ -1,7 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2015, 2018, MariaDB Corporation.
|
Copyright (c) 2015, 2019, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -200,9 +200,7 @@ enum roll_node_state {
|
|||||||
struct roll_node_t{
|
struct roll_node_t{
|
||||||
que_common_t common; /*!< node type: QUE_NODE_ROLLBACK */
|
que_common_t common; /*!< node type: QUE_NODE_ROLLBACK */
|
||||||
enum roll_node_state state; /*!< node execution state */
|
enum roll_node_state state; /*!< node execution state */
|
||||||
bool partial;/*!< TRUE if we want a partial
|
const trx_savept_t* savept; /*!< savepoint to which to
|
||||||
rollback */
|
|
||||||
trx_savept_t savept; /*!< savepoint to which to
|
|
||||||
roll back, in the case of a
|
roll back, in the case of a
|
||||||
partial rollback */
|
partial rollback */
|
||||||
que_thr_t* undo_thr;/*!< undo query graph */
|
que_thr_t* undo_thr;/*!< undo query graph */
|
||||||
|
@ -83,8 +83,7 @@ trx_rollback_to_savepoint_low(
|
|||||||
roll_node = roll_node_create(heap);
|
roll_node = roll_node_create(heap);
|
||||||
|
|
||||||
if (savept != NULL) {
|
if (savept != NULL) {
|
||||||
roll_node->partial = TRUE;
|
roll_node->savept = savept;
|
||||||
roll_node->savept = *savept;
|
|
||||||
check_trx_state(trx);
|
check_trx_state(trx);
|
||||||
} else {
|
} else {
|
||||||
assert_trx_nonlocking_or_in_list(trx);
|
assert_trx_nonlocking_or_in_list(trx);
|
||||||
@ -1122,7 +1121,7 @@ que_thr_t*
|
|||||||
trx_rollback_start(
|
trx_rollback_start(
|
||||||
/*===============*/
|
/*===============*/
|
||||||
trx_t* trx, /*!< in: transaction */
|
trx_t* trx, /*!< in: transaction */
|
||||||
ib_id_t roll_limit) /*!< in: rollback to undo no (for
|
undo_no_t roll_limit) /*!< in: rollback to undo no (for
|
||||||
partial undo), 0 if we are rolling back
|
partial undo), 0 if we are rolling back
|
||||||
the entire transaction */
|
the entire transaction */
|
||||||
{
|
{
|
||||||
@ -1215,7 +1214,7 @@ trx_rollback_step(
|
|||||||
|
|
||||||
ut_a(node->undo_thr == NULL);
|
ut_a(node->undo_thr == NULL);
|
||||||
|
|
||||||
roll_limit = node->partial ? node->savept.least_undo_no : 0;
|
roll_limit = node->savept ? node->savept->least_undo_no : 0;
|
||||||
|
|
||||||
trx_commit_or_rollback_prepare(trx);
|
trx_commit_or_rollback_prepare(trx);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user