diff options
Diffstat (limited to 'storage/xtradb/include/mtr0mtr.h')
-rw-r--r-- | storage/xtradb/include/mtr0mtr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/xtradb/include/mtr0mtr.h b/storage/xtradb/include/mtr0mtr.h index 2d3da4d2a25..7d115eed5fd 100644 --- a/storage/xtradb/include/mtr0mtr.h +++ b/storage/xtradb/include/mtr0mtr.h @@ -2,6 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2013, 2020, 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 @@ -57,6 +58,7 @@ first 3 values must be RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH */ #endif /* UNIV_DEBUG */ #define MTR_MEMO_S_LOCK 55 #define MTR_MEMO_X_LOCK 56 +#define MTR_MEMO_SPACE_X_LOCK 57 /** @name Log item types The log items are declared 'byte' so that the compiler can warn if val @@ -293,6 +295,8 @@ This macro locks an rw-lock in s-mode. */ This macro locks an rw-lock in x-mode. */ #define mtr_x_lock(B, MTR) mtr_x_lock_func((B), __FILE__, __LINE__,\ (MTR)) +#define mtr_x_space_lock(B, MTR) mtr_x_space_lock_func(B, __FILE__, __LINE__,\ + MTR) /*********************************************************************//** NOTE! Use the macro above! Locks a lock in s-mode. */ @@ -315,6 +319,14 @@ mtr_x_lock_func( const char* file, /*!< in: file name */ ulint line, /*!< in: line number */ mtr_t* mtr); /*!< in: mtr */ + +/** Acquire exclusive tablespace latch. +@param lock fil_space_t::latch +@param file source code file name of the caller +@param line source code line number of the caller +@param mtr mini-transaction */ +inline void mtr_x_space_lock_func(prio_rw_lock_t *lock, + const char *file, ulint line, mtr_t *mtr); #endif /* !UNIV_HOTBACKUP */ /***************************************************//** |