Commit 4e9f8c9c authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 793bd3ee
/*****************************************************************************
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
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{
que_common_t common; /*!< node type: QUE_NODE_ROLLBACK */
enum roll_node_state state; /*!< node execution state */
bool partial;/*!< TRUE if we want a partial
rollback */
trx_savept_t savept; /*!< savepoint to which to
const trx_savept_t* savept; /*!< savepoint to which to
roll back, in the case of a
partial rollback */
que_thr_t* undo_thr;/*!< undo query graph */
......
......@@ -83,8 +83,7 @@ trx_rollback_to_savepoint_low(
roll_node = roll_node_create(heap);
if (savept != NULL) {
roll_node->partial = TRUE;
roll_node->savept = *savept;
roll_node->savept = savept;
check_trx_state(trx);
} else {
assert_trx_nonlocking_or_in_list(trx);
......@@ -1122,7 +1121,7 @@ que_thr_t*
trx_rollback_start(
/*===============*/
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
the entire transaction */
{
......@@ -1215,7 +1214,7 @@ trx_rollback_step(
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment