diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-09 15:58:33 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-09 15:58:33 +0200 |
commit | 15bdfeeba82134ed09ee3424db804fad1b613d8c (patch) | |
tree | 94fde9fcba31fa69848fbf115f14a30834bf1c4d /storage/innobase/include/trx0rseg.h | |
parent | 24cbc8dae3f94214a752c757fb82fc80faa1d864 (diff) | |
download | mariadb-git-15bdfeeba82134ed09ee3424db804fad1b613d8c.tar.gz |
Remove trx_sys_t::pending_purge_rseg_array.
In MySQL 5.7, there is some redundant code for supposedly handling
an upgrade from an earlier version of InnoDB.
An upgrade of InnoDB between major versions should include a
slow shutdown (innodb_fast_shutdown=0) of the previous version.
A comment in trx_lists_init_at_db_start() confused clean shutdown
and slow shutdown. A clean shutdown does not necessarily guarantee
that there are no active transactions. A slow shutdown guarantees
that.
Because there was no code to handle rollback of recovered transactions
that happened to use the rollback segment slots that MySQL 5.7.2
repurposed for temporary undo logs, the upgrade is not working in all
cases, and we may as well remove the code to handle purging.
trx_sys_t::pending_purge_rseg_array: Remove.
trx_undo_get_undo_rec_low(): Define as static. Remove the parameter
is_redo_rseg.
trx_undo_get_undo_rec(), trx_rseg_get_on_id(): Remove the parameter
is_redo_rseg.
trx_rseg_mem_free(): Remove the second parameter.
trx_sys_get_nth_rseg(): Replace with trx_rseg_get_on_id().
trx_rseg_schedule_pending_purge(): Remove.
Diffstat (limited to 'storage/innobase/include/trx0rseg.h')
-rw-r--r-- | storage/innobase/include/trx0rseg.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h index b9cbd387a62..8d58b0a1409 100644 --- a/storage/innobase/include/trx0rseg.h +++ b/storage/innobase/include/trx0rseg.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, 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 @@ -26,7 +27,6 @@ Created 3/26/1996 Heikki Tuuri #ifndef trx0rseg_h #define trx0rseg_h -#include "univ.i" #include "trx0types.h" #include "trx0sys.h" #include "fut0lst.h" @@ -89,15 +89,16 @@ trx_rsegf_undo_find_free( /*=====================*/ trx_rsegf_t* rsegf, /*!< in: rollback segment header */ mtr_t* mtr); /*!< in: mtr */ -/******************************************************************//** -Looks for a rollback segment, based on the rollback segment id. +/** Get a rollback segment. +@param[in] id rollback segment id @return rollback segment */ UNIV_INLINE trx_rseg_t* -trx_rseg_get_on_id( -/*===============*/ - ulint id, /*!< in: rollback segment id */ - bool is_redo_rseg); /*!< in: true if redo rseg else false. */ +trx_rseg_get_on_id(ulint id) +{ + ut_a(id < TRX_SYS_N_RSEGS); + return(trx_sys->rseg_array[id]); +} /** Creates a rollback segment header. This function is called only when a new rollback segment is created in @@ -124,14 +125,10 @@ trx_rseg_array_init( /*================*/ purge_pq_t* purge_queue); /*!< in: rseg queue */ -/*************************************************************************** -Free's an instance of the rollback segment in memory. */ +/** Free a rollback segment in memory. */ void -trx_rseg_mem_free( -/*==============*/ - trx_rseg_t* rseg, /*!< in, own: instance to free */ - trx_rseg_t** rseg_array); /*!< out: add rseg reference to this - central array. */ +trx_rseg_mem_free(trx_rseg_t* rseg); + /********************************************************************* Creates a rollback segment. */ trx_rseg_t* |