diff options
author | Jan Lindström <jplindst@mariadb.org> | 2014-10-24 22:26:31 +0300 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2014-10-24 22:26:31 +0300 |
commit | 3486135bb5c9e21fd678821dee35484a81351cfb (patch) | |
tree | c09b49a45c06dde85e456f00223e5ee1a8bd45f9 /storage/xtradb/include/mtr0mtr.h | |
parent | ca0bdc4d5c196f5282d2f803023c032e151432d9 (diff) | |
download | mariadb-git-3486135bb5c9e21fd678821dee35484a81351cfb.tar.gz |
MDEV-6928: Add trx pointer to struct mtr_t
Merge Facebook commit 25295d003cb0c17aa8fb756523923c77250b3294
authored by Steaphan Greene from https://github.com/facebook/mysql-5.6
This adds a pointer to the trx to each mtr.
This allows the trx to be accessed in parts of the code
where it was otherwise not available. This is needed later.
Diffstat (limited to 'storage/xtradb/include/mtr0mtr.h')
-rw-r--r-- | storage/xtradb/include/mtr0mtr.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/storage/xtradb/include/mtr0mtr.h b/storage/xtradb/include/mtr0mtr.h index 0730e870b3f..827039953be 100644 --- a/storage/xtradb/include/mtr0mtr.h +++ b/storage/xtradb/include/mtr0mtr.h @@ -35,6 +35,7 @@ Created 11/26/1995 Heikki Tuuri #include "ut0byte.h" #include "mtr0types.h" #include "page0types.h" +#include "trx0types.h" /* Logging modes for a mini-transaction */ #define MTR_LOG_ALL 21 /* default mode: log all operations @@ -204,10 +205,22 @@ functions). The page number parameter was originally written as 0. @{ */ Starts a mini-transaction. */ UNIV_INLINE void +mtr_start_trx( +/*======*/ + mtr_t* mtr, /*!< out: mini-transaction */ + trx_t* trx) /*!< in: transaction */ + __attribute__((nonnull (1))); +/***************************************************************//** +Starts a mini-transaction. */ +UNIV_INLINE +void mtr_start( /*======*/ mtr_t* mtr) /*!< out: mini-transaction */ - __attribute__((nonnull)); +{ + mtr_start_trx(mtr, NULL); +} + __attribute__((nonnull)) /***************************************************************//** Commits a mini-transaction. */ UNIV_INTERN @@ -403,6 +416,7 @@ struct mtr_t{ #ifdef UNIV_DEBUG ulint magic_n; #endif /* UNIV_DEBUG */ + trx_t* trx; /*!< transaction */ }; #ifdef UNIV_DEBUG |