summaryrefslogtreecommitdiff
path: root/storage/xtradb/include/mtr0mtr.ic
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/include/mtr0mtr.ic')
-rw-r--r--storage/xtradb/include/mtr0mtr.ic108
1 files changed, 57 insertions, 51 deletions
diff --git a/storage/xtradb/include/mtr0mtr.ic b/storage/xtradb/include/mtr0mtr.ic
index 7d6d99917b7..310c7c4117f 100644
--- a/storage/xtradb/include/mtr0mtr.ic
+++ b/storage/xtradb/include/mtr0mtr.ic
@@ -16,26 +16,28 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/
-/******************************************************
+/**************************************************//**
+@file include/mtr0mtr.ic
Mini-transaction buffer
Created 11/26/1995 Heikki Tuuri
*******************************************************/
-#include "sync0sync.h"
-#include "sync0rw.h"
+#ifndef UNIV_HOTBACKUP
+# include "sync0sync.h"
+# include "sync0rw.h"
+#endif /* !UNIV_HOTBACKUP */
#include "mach0data.h"
-/*******************************************************************
+/***************************************************************//**
Starts a mini-transaction and creates a mini-transaction handle
-and a buffer in the memory buffer given by the caller. */
+and a buffer in the memory buffer given by the caller.
+@return mtr buffer which also acts as the mtr handle */
UNIV_INLINE
mtr_t*
mtr_start(
/*======*/
- /* out: mtr buffer which also acts as
- the mtr handle */
- mtr_t* mtr) /* in: memory buffer for the mtr buffer */
+ mtr_t* mtr) /*!< in: memory buffer for the mtr buffer */
{
dyn_array_create(&(mtr->memo));
dyn_array_create(&(mtr->log));
@@ -50,15 +52,15 @@ mtr_start(
return(mtr);
}
-/*******************************************************
+/***************************************************//**
Pushes an object to an mtr memo stack. */
UNIV_INLINE
void
mtr_memo_push(
/*==========*/
- mtr_t* mtr, /* in: mtr */
- void* object, /* in: object */
- ulint type) /* in: object type: MTR_MEMO_S_LOCK, ... */
+ mtr_t* mtr, /*!< in: mtr */
+ void* object, /*!< in: object */
+ ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */
{
dyn_array_t* memo;
mtr_memo_slot_t* slot;
@@ -77,14 +79,14 @@ mtr_memo_push(
slot->type = type;
}
-/**************************************************************
-Sets and returns a savepoint in mtr. */
+/**********************************************************//**
+Sets and returns a savepoint in mtr.
+@return savepoint */
UNIV_INLINE
ulint
mtr_set_savepoint(
/*==============*/
- /* out: savepoint */
- mtr_t* mtr) /* in: mtr */
+ mtr_t* mtr) /*!< in: mtr */
{
dyn_array_t* memo;
@@ -96,16 +98,17 @@ mtr_set_savepoint(
return(dyn_array_get_data_size(memo));
}
-/**************************************************************
+#ifndef UNIV_HOTBACKUP
+/**********************************************************//**
Releases the (index tree) s-latch stored in an mtr memo after a
savepoint. */
UNIV_INLINE
void
mtr_release_s_latch_at_savepoint(
/*=============================*/
- mtr_t* mtr, /* in: mtr */
- ulint savepoint, /* in: savepoint */
- rw_lock_t* lock) /* in: latch to release */
+ mtr_t* mtr, /*!< in: mtr */
+ ulint savepoint, /*!< in: savepoint */
+ rw_lock_t* lock) /*!< in: latch to release */
{
mtr_memo_slot_t* slot;
dyn_array_t* memo;
@@ -128,17 +131,17 @@ mtr_release_s_latch_at_savepoint(
slot->object = NULL;
}
-#ifdef UNIV_DEBUG
-/**************************************************************
-Checks if memo contains the given item. */
+# ifdef UNIV_DEBUG
+/**********************************************************//**
+Checks if memo contains the given item.
+@return TRUE if contains */
UNIV_INLINE
ibool
mtr_memo_contains(
/*==============*/
- /* out: TRUE if contains */
- mtr_t* mtr, /* in: mtr */
- const void* object, /* in: object to search */
- ulint type) /* in: type of object */
+ mtr_t* mtr, /*!< in: mtr */
+ const void* object, /*!< in: object to search */
+ ulint type) /*!< in: type of object */
{
mtr_memo_slot_t* slot;
dyn_array_t* memo;
@@ -164,16 +167,17 @@ mtr_memo_contains(
return(FALSE);
}
-#endif /* UNIV_DEBUG */
+# endif /* UNIV_DEBUG */
+#endif /* !UNIV_HOTBACKUP */
-/*******************************************************************
-Returns the log object of a mini-transaction buffer. */
+/***************************************************************//**
+Returns the log object of a mini-transaction buffer.
+@return log */
UNIV_INLINE
dyn_array_t*
mtr_get_log(
/*========*/
- /* out: log */
- mtr_t* mtr) /* in: mini-transaction */
+ mtr_t* mtr) /*!< in: mini-transaction */
{
ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N);
@@ -181,14 +185,14 @@ mtr_get_log(
return(&(mtr->log));
}
-/*******************************************************************
-Gets the logging mode of a mini-transaction. */
+/***************************************************************//**
+Gets the logging mode of a mini-transaction.
+@return logging mode: MTR_LOG_NONE, ... */
UNIV_INLINE
ulint
mtr_get_log_mode(
/*=============*/
- /* out: logging mode: MTR_LOG_NONE, ... */
- mtr_t* mtr) /* in: mtr */
+ mtr_t* mtr) /*!< in: mtr */
{
ut_ad(mtr);
ut_ad(mtr->log_mode >= MTR_LOG_ALL);
@@ -197,15 +201,15 @@ mtr_get_log_mode(
return(mtr->log_mode);
}
-/*******************************************************************
-Changes the logging mode of a mini-transaction. */
+/***************************************************************//**
+Changes the logging mode of a mini-transaction.
+@return old mode */
UNIV_INLINE
ulint
mtr_set_log_mode(
/*=============*/
- /* out: old mode */
- mtr_t* mtr, /* in: mtr */
- ulint mode) /* in: logging mode: MTR_LOG_NONE, ... */
+ mtr_t* mtr, /*!< in: mtr */
+ ulint mode) /*!< in: logging mode: MTR_LOG_NONE, ... */
{
ulint old_mode;
@@ -227,16 +231,17 @@ mtr_set_log_mode(
return(old_mode);
}
-/*************************************************************************
+#ifndef UNIV_HOTBACKUP
+/*********************************************************************//**
Locks a lock in s-mode. */
UNIV_INLINE
void
mtr_s_lock_func(
/*============*/
- rw_lock_t* lock, /* in: rw-lock */
- const char* file, /* in: file name */
- ulint line, /* in: line number */
- mtr_t* mtr) /* in: mtr */
+ rw_lock_t* lock, /*!< in: rw-lock */
+ const char* file, /*!< in: file name */
+ ulint line, /*!< in: line number */
+ mtr_t* mtr) /*!< in: mtr */
{
ut_ad(mtr);
ut_ad(lock);
@@ -246,16 +251,16 @@ mtr_s_lock_func(
mtr_memo_push(mtr, lock, MTR_MEMO_S_LOCK);
}
-/*************************************************************************
+/*********************************************************************//**
Locks a lock in x-mode. */
UNIV_INLINE
void
mtr_x_lock_func(
/*============*/
- rw_lock_t* lock, /* in: rw-lock */
- const char* file, /* in: file name */
- ulint line, /* in: line number */
- mtr_t* mtr) /* in: mtr */
+ rw_lock_t* lock, /*!< in: rw-lock */
+ const char* file, /*!< in: file name */
+ ulint line, /*!< in: line number */
+ mtr_t* mtr) /*!< in: mtr */
{
ut_ad(mtr);
ut_ad(lock);
@@ -264,3 +269,4 @@ mtr_x_lock_func(
mtr_memo_push(mtr, lock, MTR_MEMO_X_LOCK);
}
+#endif /* !UNIV_HOTBACKUP */