summaryrefslogtreecommitdiff
path: root/storage/innobase/include/log0log.ic
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-01 17:27:34 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-01 17:27:34 +0300
commit1d0f70c2f894b27e98773a282871d32802f67964 (patch)
tree833e683e0ced29c4323c29a9d845703d4dfcd81b /storage/innobase/include/log0log.ic
parent5a86a61219826aadf8d08cbc447fe438f2bf50c3 (diff)
downloadmariadb-git-1d0f70c2f894b27e98773a282871d32802f67964.tar.gz
Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6
Diffstat (limited to 'storage/innobase/include/log0log.ic')
-rw-r--r--storage/innobase/include/log0log.ic30
1 files changed, 17 insertions, 13 deletions
diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic
index 67db6695cab..5ecd7b85a26 100644
--- a/storage/innobase/include/log0log.ic
+++ b/storage/innobase/include/log0log.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2010, 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
*****************************************************************************/
@@ -26,6 +26,7 @@ Created 12/9/1995 Heikki Tuuri
#include "os0file.h"
#include "mach0data.h"
#include "mtr0mtr.h"
+#include "srv0mon.h"
#ifdef UNIV_LOG_DEBUG
/******************************************************//**
@@ -192,7 +193,7 @@ UNIV_INLINE
ulint
log_block_convert_lsn_to_no(
/*========================*/
- ib_uint64_t lsn) /*!< in: lsn of a byte within the block */
+ lsn_t lsn) /*!< in: lsn of a byte within the block */
{
return(((ulint) (lsn / OS_FILE_LOG_BLOCK_SIZE) & 0x3FFFFFFFUL) + 1);
}
@@ -260,8 +261,8 @@ UNIV_INLINE
void
log_block_init(
/*===========*/
- byte* log_block, /*!< in: pointer to the log buffer */
- ib_uint64_t lsn) /*!< in: lsn within the log block */
+ byte* log_block, /*!< in: pointer to the log buffer */
+ lsn_t lsn) /*!< in: lsn within the log block */
{
ulint no;
@@ -282,8 +283,8 @@ UNIV_INLINE
void
log_block_init_in_old_format(
/*=========================*/
- byte* log_block, /*!< in: pointer to the log buffer */
- ib_uint64_t lsn) /*!< in: lsn within the log block */
+ byte* log_block, /*!< in: pointer to the log buffer */
+ lsn_t lsn) /*!< in: lsn within the log block */
{
ulint no;
@@ -304,12 +305,12 @@ Writes to the log the string given. The log must be released with
log_release.
@return end lsn of the log record, zero if did not succeed */
UNIV_INLINE
-ib_uint64_t
+lsn_t
log_reserve_and_write_fast(
/*=======================*/
const void* str, /*!< in: string */
ulint len, /*!< in: string length */
- ib_uint64_t* start_lsn)/*!< out: start lsn of the log record */
+ lsn_t* start_lsn)/*!< out: start lsn of the log record */
{
ulint data_len;
#ifdef UNIV_LOG_LSN_DEBUG
@@ -374,6 +375,9 @@ log_reserve_and_write_fast(
log_sys->lsn += len;
+ MONITOR_SET(MONITOR_LSN_CHECKPOINT_AGE,
+ log_sys->lsn - log_sys->last_checkpoint_lsn);
+
#ifdef UNIV_LOG_DEBUG
log_check_log_recs(log_sys->buf + log_sys->old_buf_free,
log_sys->buf_free - log_sys->old_buf_free,
@@ -396,11 +400,11 @@ log_release(void)
Gets the current lsn.
@return current lsn */
UNIV_INLINE
-ib_uint64_t
+lsn_t
log_get_lsn(void)
/*=============*/
{
- ib_uint64_t lsn;
+ lsn_t lsn;
mutex_enter(&(log_sys->mutex));
@@ -416,7 +420,7 @@ Gets the log group capacity. It is OK to read the value without
holding log_sys->mutex because it is constant.
@return log group capacity */
UNIV_INLINE
-ulint
+lsn_t
log_get_capacity(void)
/*==================*/
{