diff options
Diffstat (limited to 'storage/innobase/include/trx0rseg.ic')
-rw-r--r-- | storage/innobase/include/trx0rseg.ic | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.ic index 5e8d2b41120..30743da9b8c 100644 --- a/storage/innobase/include/trx0rseg.ic +++ b/storage/innobase/include/trx0rseg.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. 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 @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -86,7 +86,7 @@ trx_rsegf_get_nth_undo( ulint n, /*!< in: index of slot */ mtr_t* mtr) /*!< in: mtr */ { - if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) { + if (n >= TRX_RSEG_N_SLOTS) { fprintf(stderr, "InnoDB: Error: trying to get slot %lu of rseg\n", (ulong) n); @@ -108,7 +108,7 @@ trx_rsegf_set_nth_undo( ulint page_no,/*!< in: page number of the undo log segment */ mtr_t* mtr) /*!< in: mtr */ { - if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) { + if (n >= TRX_RSEG_N_SLOTS) { fprintf(stderr, "InnoDB: Error: trying to set slot %lu of rseg\n", (ulong) n); @@ -150,3 +150,18 @@ trx_rsegf_undo_find_free( return(ULINT_UNDEFINED); } + +/******************************************************************//** +Looks for a rollback segment, based on the rollback segment id. +@return rollback segment */ +UNIV_INLINE +trx_rseg_t* +trx_rseg_get_on_id( +/*===============*/ + ulint id) /*!< in: rollback segment id */ +{ + ut_a(id < TRX_SYS_N_RSEGS); + + return(trx_sys->rseg_array[id]); +} + |