summaryrefslogtreecommitdiff
path: root/storage/innobase/include/buf0buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/buf0buf.h')
-rw-r--r--storage/innobase/include/buf0buf.h72
1 files changed, 13 insertions, 59 deletions
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 617bb2b9b5d..e1c92c130c4 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -27,6 +27,9 @@ Created 11/5/1995 Heikki Tuuri
#ifndef buf0buf_h
#define buf0buf_h
+/** Magic value to use instead of checksums when they are disabled */
+#define BUF_NO_CHECKSUM_MAGIC 0xDEADBEEFUL
+
#include "univ.i"
#include "fil0fil.h"
#include "mtr0types.h"
@@ -35,7 +38,6 @@ Created 11/5/1995 Heikki Tuuri
#include "hash0hash.h"
#include "ut0byte.h"
#include "page0types.h"
-#ifndef UNIV_HOTBACKUP
#include "ut0rbt.h"
#include "os0proc.h"
#include "log0log.h"
@@ -99,20 +101,11 @@ extern volatile ulint buf_withdraw_clock; /*!< the clock is incremented
every time a pointer to a page may
become obsolete */
-#ifdef UNIV_DEBUG
+# ifdef UNIV_DEBUG
extern my_bool buf_disable_resize_buffer_pool_debug; /*!< if TRUE, resizing
buffer pool is not allowed. */
-#endif /* UNIV_DEBUG */
-#else /* !UNIV_HOTBACKUP */
-extern buf_block_t* back_block1; /*!< first block, for --apply-log */
-extern buf_block_t* back_block2; /*!< second block, for page reorganize */
-#endif /* !UNIV_HOTBACKUP */
-#endif /* !UNIV_INNOCHECKSUM */
-
-/** Magic value to use instead of checksums when they are disabled */
-#define BUF_NO_CHECKSUM_MAGIC 0xDEADBEEFUL
+# endif /* UNIV_DEBUG */
-#ifndef UNIV_INNOCHECKSUM
/** @brief States of a control block
@see buf_page_t
@@ -341,7 +334,6 @@ operator<<(
std::ostream& out,
const page_id_t& page_id);
-#ifndef UNIV_HOTBACKUP
/********************************************************************//**
Acquire mutex on all buffer pool instances */
UNIV_INLINE
@@ -468,7 +460,7 @@ void
buf_block_free(
/*===========*/
buf_block_t* block); /*!< in, own: block to be freed */
-#endif /* !UNIV_HOTBACKUP */
+
/*********************************************************************//**
Copies contents of a buffer frame to a given buffer.
@return buf */
@@ -478,7 +470,7 @@ buf_frame_copy(
/*===========*/
byte* buf, /*!< in: buffer to copy to */
const buf_frame_t* frame); /*!< in: buffer frame */
-#ifndef UNIV_HOTBACKUP
+
/**************************************************************//**
NOTE! The following macros should be used instead of buf_page_get_gen,
to improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed
@@ -597,21 +589,6 @@ buf_page_create(
const page_size_t& page_size,
mtr_t* mtr);
-#else /* !UNIV_HOTBACKUP */
-
-/** Inits a page to the buffer buf_pool, for use in mysqlbackup --restore.
-@param[in] page_id page id
-@param[in] page_size page size
-@param[in,out] block block to init */
-void
-buf_page_init_for_backup_restore(
- const page_id_t& page_id,
- const page_size_t& page_size,
- buf_block_t* block);
-
-#endif /* !UNIV_HOTBACKUP */
-
-#ifndef UNIV_HOTBACKUP
/********************************************************************//**
Releases a compressed-only page acquired with buf_page_get_zip(). */
UNIV_INLINE
@@ -788,17 +765,14 @@ buf_block_unfix(
@param[in,out] b block to bufferfix
@param[in] f file name where requested
@param[in] l line number where requested */
-# define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(f,l,b)
+# define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(f,l,b)
# else /* UNIV_DEBUG */
/** Increments the bufferfix count.
@param[in,out] b block to bufferfix
@param[in] f file name where requested
@param[in] l line number where requested */
-# define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(b)
+# define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(b)
# endif /* UNIV_DEBUG */
-#else /* !UNIV_HOTBACKUP */
-# define buf_block_modify_clock_inc(block) ((void) 0)
-#endif /* !UNIV_HOTBACKUP */
#endif /* !UNIV_INNOCHECKSUM */
/** Checks if a page contains only zeroes.
@@ -835,7 +809,6 @@ buf_page_is_corrupted(
#endif /* UNIV_INNOCHECKSUM */
) MY_ATTRIBUTE((warn_unused_result));
#ifndef UNIV_INNOCHECKSUM
-#ifndef UNIV_HOTBACKUP
/**********************************************************************//**
Gets the space id, page offset, and byte offset within page of a
pointer pointing to a buffer frame containing a file page. */
@@ -893,7 +866,7 @@ void
buf_print(void);
/*============*/
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
-#endif /* !UNIV_HOTBACKUP */
+
enum buf_page_print_flags {
/** Do not crash at the end of buf_page_print(). */
BUF_PAGE_PRINT_NO_CRASH = 1,
@@ -920,7 +893,7 @@ buf_zip_decompress(
/*===============*/
buf_block_t* block, /*!< in/out: block */
ibool check); /*!< in: TRUE=verify the page checksum */
-#ifndef UNIV_HOTBACKUP
+
#ifdef UNIV_DEBUG
/*********************************************************************//**
Returns the number of latched pages in the buffer pool.
@@ -990,7 +963,6 @@ this function is called: not latched and not modified. */
void
buf_pool_invalidate(void);
/*=====================*/
-#endif /* !UNIV_HOTBACKUP */
/*========================================================================
--------------------------- LOWER LEVEL ROUTINES -------------------------
@@ -1063,7 +1035,7 @@ buf_page_in_file(
/*=============*/
const buf_page_t* bpage) /*!< in: pointer to control block */
MY_ATTRIBUTE((warn_unused_result));
-#ifndef UNIV_HOTBACKUP
+
/*********************************************************************//**
Determines if a block should be on unzip_LRU list.
@return TRUE if block belongs to unzip_LRU */
@@ -1221,7 +1193,7 @@ buf_page_get_block(
/*===============*/
buf_page_t* bpage) /*!< in: control block, or NULL */
MY_ATTRIBUTE((warn_unused_result));
-#endif /* !UNIV_HOTBACKUP */
+
#ifdef UNIV_DEBUG
/*********************************************************************//**
Gets a pointer to the memory frame of a block.
@@ -1241,7 +1213,6 @@ Gets the compressed page descriptor corresponding to an uncompressed page
if applicable. */
#define buf_block_get_page_zip(block) \
((block)->page.zip.data ? &(block)->page.zip : NULL)
-#ifndef UNIV_HOTBACKUP
/** Get a buffer block from an adaptive hash index pointer.
This function does not return if the block is not identified.
@@ -1425,13 +1396,6 @@ buf_page_hash_get_low() function.
#define buf_block_hash_get(b, page_id) \
buf_block_hash_get_locked(b, page_id, NULL, 0)
-/*********************************************************************//**
-Gets the current length of the free list of buffer blocks.
-@return length of the free list */
-ulint
-buf_get_free_list_len(void);
-/*=======================*/
-
/********************************************************************//**
Determine if a block is a sentinel for a buffer pool watch.
@return TRUE if a sentinel for a buffer pool watch, FALSE if not */
@@ -1531,8 +1495,6 @@ buf_flush_update_zip_checksum(
ulint size,
lsn_t lsn);
-#endif /* !UNIV_HOTBACKUP */
-
/********************************************************************//**
The hook that is called just before a page is written to disk.
The function encrypts the content of the page and returns a pointer
@@ -1635,7 +1597,6 @@ public:
/** Block state. @see buf_page_in_file */
buf_page_state state;
-#ifndef UNIV_HOTBACKUP
unsigned flush_type:2; /*!< if this block is currently being
flushed to disk, this tells the
flush_type.
@@ -1646,7 +1607,6 @@ public:
# error "MAX_BUFFER_POOLS > 64; redefine buf_pool_index:6"
# endif
/* @} */
-#endif /* !UNIV_HOTBACKUP */
page_zip_des_t zip; /*!< compressed page; zip.data
(but not the data it points to) is
also protected by buf_pool->mutex;
@@ -1678,7 +1638,6 @@ public:
buf_tmp_buffer_t* slot; /*!< Slot for temporary memory
used for encryption/compression
or NULL */
- #ifndef UNIV_HOTBACKUP
buf_page_t* hash; /*!< node used in chaining to
buf_pool->page_hash or
buf_pool->zip_hash */
@@ -1792,7 +1751,6 @@ public:
protected by buf_pool->zip_mutex
or buf_block_t::mutex. */
# endif /* UNIV_DEBUG */
-#endif /* !UNIV_HOTBACKUP */
};
/** The buffer control block structure */
@@ -1810,7 +1768,6 @@ struct buf_block_t{
is of size UNIV_PAGE_SIZE, and
aligned to an address divisible by
UNIV_PAGE_SIZE */
-#ifndef UNIV_HOTBACKUP
BPageLock lock; /*!< read-write lock of the buffer
frame */
UT_LIST_NODE_T(buf_block_t) unzip_LRU;
@@ -1916,7 +1873,6 @@ struct buf_block_t{
and accessed; we introduce this new
mutex in InnoDB-5.1 to relieve
contention on the buffer pool mutex */
-#endif /* !UNIV_HOTBACKUP */
};
/** Check if a buf_block_t object is in a valid state
@@ -1927,7 +1883,6 @@ struct buf_block_t{
&& (buf_block_get_state(block) <= BUF_BLOCK_REMOVE_HASH))
-#ifndef UNIV_HOTBACKUP
/**********************************************************************//**
Compute the hash fold value for blocks in buf_pool->zip_hash. */
/* @{ */
@@ -2462,7 +2417,6 @@ Use these instead of accessing buf_pool->mutex directly. */
/** Release the buffer pool mutex. */
# define buf_pool_mutex_exit(b) mutex_exit(&b->mutex)
#endif
-#endif /* !UNIV_HOTBACKUP */
/* @} */
/**********************************************************************