diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-26 17:37:19 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-26 17:40:20 +0300 |
commit | 4e9f8c9cc4932db53d5bae456bcdb9f33f822254 (patch) | |
tree | 1c8a00fcd80722ee249e1b36b6cd349414ae2474 /storage/innobase | |
parent | 793bd3ee13972896e576a67528f6d940ad8261c5 (diff) | |
download | mariadb-git-4e9f8c9cc4932db53d5bae456bcdb9f33f822254.tar.gz |
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.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/include/trx0roll.h | 6 | ||||
-rw-r--r-- | storage/innobase/trx/trx0roll.cc | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/storage/innobase/include/trx0roll.h b/storage/innobase/include/trx0roll.h index d6fe576da90..70eaf48b83b 100644 --- a/storage/innobase/include/trx0roll.h +++ b/storage/innobase/include/trx0roll.h @@ -1,7 +1,7 @@ /***************************************************************************** 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 */ diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index a592fb47d21..474b627a11e 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -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); |