Commit 17e371ff authored by Marko Mäkelä's avatar Marko Mäkelä

More InnoDB preprocessor cleanup

Remove unnecessary #include.

Remove references to UNIV_MATERIALIZE, UNIV_INLINE_ORIGINAL, UNIV_NONINL
that are never defined.
parent 757530b8
/* /*
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014, 2017, MariaDB Corporation. Copyright (c) 2014, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -45,15 +45,7 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */ ...@@ -45,15 +45,7 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
typedef void fil_space_t; typedef void fil_space_t;
#include "page0size.h" #include "page0size.h"
#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
#define FSEG_PAGE_DATA FIL_PAGE_DATA
#define FSEG_HEADER_SIZE 10
#define UT_BITS_IN_BYTES(b) (((b) + 7) / 8)
#include "ut0ut.h" #include "ut0ut.h"
#include "ut0byte.h"
#include "mtr0types.h" #include "mtr0types.h"
#include "mach0data.h" #include "mach0data.h"
#include "fsp0types.h" #include "fsp0types.h"
...@@ -72,12 +64,6 @@ typedef void fil_space_t; ...@@ -72,12 +64,6 @@ typedef void fil_space_t;
#include <string.h> #include <string.h>
#ifdef UNIV_NONINL
# include "fsp0fsp.ic"
# include "mach0data.ic"
# include "ut0rnd.ic"
#endif
#ifndef PRIuMAX #ifndef PRIuMAX
#define PRIuMAX "llu" #define PRIuMAX "llu"
#endif #endif
......
...@@ -35,12 +35,9 @@ Created 11/5/1995 Heikki Tuuri ...@@ -35,12 +35,9 @@ Created 11/5/1995 Heikki Tuuri
#include "mach0data.h" #include "mach0data.h"
#include "page0size.h" #include "page0size.h"
#include "buf0buf.h" #include "buf0buf.h"
#include "buf0checksum.h"
#include <string.h> #include <string.h>
#ifdef UNIV_NONINL
#include "buf0buf.ic"
#endif
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "mem0mem.h" #include "mem0mem.h"
#include "btr0btr.h" #include "btr0btr.h"
...@@ -60,19 +57,14 @@ Created 11/5/1995 Heikki Tuuri ...@@ -60,19 +57,14 @@ Created 11/5/1995 Heikki Tuuri
#include "dict0dict.h" #include "dict0dict.h"
#include "log0recv.h" #include "log0recv.h"
#include "srv0mon.h" #include "srv0mon.h"
#include "fil0pagecompress.h"
#include "fsp0pagecompress.h"
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
#include "page0zip.h" #include "page0zip.h"
#include "sync0sync.h" #include "sync0sync.h"
#include "buf0dump.h" #include "buf0dump.h"
#include <new>
#include <map> #include <map>
#include <sstream> #include <sstream>
#ifndef UNIV_INNOCHECKSUM
#include "fil0pagecompress.h"
#include "fsp0pagecompress.h"
#endif
#include "ut0byte.h"
#include <new>
#ifdef UNIV_LINUX #ifdef UNIV_LINUX
#include <stdlib.h> #include <stdlib.h>
......
...@@ -23,16 +23,16 @@ Created Jonas Oreland Google ...@@ -23,16 +23,16 @@ Created Jonas Oreland Google
Modified Jan Lindström jan.lindstrom@mariadb.com Modified Jan Lindström jan.lindstrom@mariadb.com
*******************************************************/ *******************************************************/
#include "fil0fil.h" #include "fil0crypt.h"
#include "mtr0types.h" #include "mtr0types.h"
#include "mach0data.h" #include "mach0data.h"
#include "page0size.h"
#include "page0zip.h" #include "page0zip.h"
#ifndef UNIV_INNOCHECKSUM #include "buf0checksum.h"
#include "fil0crypt.h" #ifdef UNIV_INNOCHECKSUM
# include "buf0buf.h"
#else
#include "srv0srv.h" #include "srv0srv.h"
#include "srv0start.h" #include "srv0start.h"
#include "log0recv.h"
#include "mtr0mtr.h" #include "mtr0mtr.h"
#include "mtr0log.h" #include "mtr0log.h"
#include "ut0ut.h" #include "ut0ut.h"
......
...@@ -26,11 +26,6 @@ Created December 2006 by Marko Makela ...@@ -26,11 +26,6 @@ Created December 2006 by Marko Makela
#ifndef buf0buddy_h #ifndef buf0buddy_h
#define buf0buddy_h #define buf0buddy_h
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE
#endif
#include "buf0types.h" #include "buf0types.h"
/**********************************************************************//** /**********************************************************************//**
......
...@@ -23,11 +23,6 @@ Binary buddy allocator for compressed pages ...@@ -23,11 +23,6 @@ Binary buddy allocator for compressed pages
Created December 2006 by Marko Makela Created December 2006 by Marko Makela
*******************************************************/ *******************************************************/
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE
#endif
#include "buf0buf.h" #include "buf0buf.h"
#include "buf0buddy.h" #include "buf0buddy.h"
...@@ -132,8 +127,3 @@ buf_buddy_free( ...@@ -132,8 +127,3 @@ buf_buddy_free(
buf_buddy_free_low(buf_pool, buf, buf_buddy_get_slot(size)); buf_buddy_free_low(buf_pool, buf, buf_buddy_get_slot(size));
} }
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE UNIV_INLINE_ORIGINAL
#endif
...@@ -26,11 +26,9 @@ Created 04/01/2015 Jan Lindström ...@@ -26,11 +26,9 @@ Created 04/01/2015 Jan Lindström
#ifndef fil0crypt_h #ifndef fil0crypt_h
#define fil0crypt_h #define fil0crypt_h
#ifndef UNIV_INNOCHECKSUM
#include "os0event.h" #include "os0event.h"
#include "my_crypt.h" #include "my_crypt.h"
#include "fil0fil.h" #include "fil0fil.h"
#endif /*! UNIV_INNOCHECKSUM */
/** /**
* Magic pattern in start of crypt data on page 0 * Magic pattern in start of crypt data on page 0
......
...@@ -27,11 +27,12 @@ Created 10/25/1995 Heikki Tuuri ...@@ -27,11 +27,12 @@ Created 10/25/1995 Heikki Tuuri
#ifndef fil0fil_h #ifndef fil0fil_h
#define fil0fil_h #define fil0fil_h
#include "page0size.h"
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "log0recv.h" #include "log0recv.h"
#include "dict0types.h" #include "dict0types.h"
#include "page0size.h"
// Forward declaration // Forward declaration
extern my_bool srv_use_doublewrite_buf; extern my_bool srv_use_doublewrite_buf;
......
...@@ -28,15 +28,15 @@ Created 12/18/1995 Heikki Tuuri ...@@ -28,15 +28,15 @@ Created 12/18/1995 Heikki Tuuri
#define fsp0fsp_h #define fsp0fsp_h
#include "fsp0types.h" #include "fsp0types.h"
#include "fut0lst.h"
#include "ut0byte.h"
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "fut0lst.h"
#include "mtr0mtr.h" #include "mtr0mtr.h"
#include "page0types.h" #include "page0types.h"
#include "rem0types.h" #include "rem0types.h"
#include "ut0byte.h" #else
# include "mach0data.h"
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
/** @return the PAGE_SSIZE flags for the current innodb_page_size */ /** @return the PAGE_SSIZE flags for the current innodb_page_size */
......
...@@ -27,10 +27,6 @@ Created May 26, 2009 Vasil Dimov ...@@ -27,10 +27,6 @@ Created May 26, 2009 Vasil Dimov
#ifndef fsp0types_h #ifndef fsp0types_h
#define fsp0types_h #define fsp0types_h
#include "univ.i"
#ifndef UNIV_INNOCHECKSUM
/** The fil_space_t::id of the redo log. All persistent tablespaces /** The fil_space_t::id of the redo log. All persistent tablespaces
have a smaller fil_space_t::id. */ have a smaller fil_space_t::id. */
#define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0U #define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0U
...@@ -50,7 +46,6 @@ fseg_alloc_free_page) */ ...@@ -50,7 +46,6 @@ fseg_alloc_free_page) */
#define FSP_NO_DIR ((byte)113) /*!< no order */ #define FSP_NO_DIR ((byte)113) /*!< no order */
/* @} */ /* @} */
#endif /* !UNIV_INNOCHECKSUM */
/** File space extent size in pages /** File space extent size in pages
page size | file space extent size page size | file space extent size
----------+----------------------- ----------+-----------------------
...@@ -73,7 +68,6 @@ page size | file space extent size ...@@ -73,7 +68,6 @@ page size | file space extent size
offset */ offset */
#define FSEG_PAGE_DATA FIL_PAGE_DATA #define FSEG_PAGE_DATA FIL_PAGE_DATA
#ifndef UNIV_INNOCHECKSUM
/** @name File segment header /** @name File segment header
The file segment header points to the inode describing the file segment. */ The file segment header points to the inode describing the file segment. */
/* @{ */ /* @{ */
...@@ -88,6 +82,7 @@ typedef byte fseg_header_t; ...@@ -88,6 +82,7 @@ typedef byte fseg_header_t;
header, in bytes */ header, in bytes */
/* @} */ /* @} */
#ifndef UNIV_INNOCHECKSUM
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
struct mtr_t; struct mtr_t;
......
...@@ -27,7 +27,6 @@ Created 12/13/1995 Heikki Tuuri ...@@ -27,7 +27,6 @@ Created 12/13/1995 Heikki Tuuri
#ifndef fut0fut_h #ifndef fut0fut_h
#define fut0fut_h #define fut0fut_h
#include "fil0fil.h"
#include "mtr0mtr.h" #include "mtr0mtr.h"
/** Gets a pointer to a file address and latches the page. /** Gets a pointer to a file address and latches the page.
......
...@@ -27,8 +27,9 @@ Created 11/28/1995 Heikki Tuuri ...@@ -27,8 +27,9 @@ Created 11/28/1995 Heikki Tuuri
#ifndef fut0lst_h #ifndef fut0lst_h
#define fut0lst_h #define fut0lst_h
#ifndef UNIV_INNOCHECKSUM #ifdef UNIV_INNOCHECKSUM
# include "fil0fil.h"
#else
#include "fut0fut.h" #include "fut0fut.h"
#include "mtr0log.h" #include "mtr0log.h"
...@@ -39,10 +40,10 @@ applied to these types! */ ...@@ -39,10 +40,10 @@ applied to these types! */
typedef byte flst_base_node_t; typedef byte flst_base_node_t;
typedef byte flst_node_t; typedef byte flst_node_t;
/* The physical size of a list base node in bytes */
#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
/* The physical size of a list base node in bytes */
#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
/* The physical size of a list node in bytes */ /* The physical size of a list node in bytes */
#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE) #define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
......
...@@ -24,12 +24,7 @@ The page cursor ...@@ -24,12 +24,7 @@ The page cursor
Created 10/4/1994 Heikki Tuuri Created 10/4/1994 Heikki Tuuri
*************************************************************************/ *************************************************************************/
#include "page0page.h"
#include "buf0types.h"
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
# include "rem0cmp.h"
/*********************************************************//** /*********************************************************//**
Gets pointer to the page frame where the cursor is positioned. Gets pointer to the page frame where the cursor is positioned.
@return page */ @return page */
......
...@@ -27,28 +27,23 @@ Created 2/2/1994 Heikki Tuuri ...@@ -27,28 +27,23 @@ Created 2/2/1994 Heikki Tuuri
#define page0page_h #define page0page_h
#include "page0types.h" #include "page0types.h"
#ifndef UNIV_INNOCHECKSUM #include "fsp0fsp.h"
#include "fil0fil.h" #include "fil0fil.h"
#include "buf0buf.h" #include "buf0buf.h"
#include "data0data.h"
#include "dict0dict.h"
#include "rem0rec.h" #include "rem0rec.h"
#endif /* !UNIV_INNOCHECKSUM*/
#include "fsp0fsp.h"
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "dict0dict.h"
#include "data0data.h"
#include "mtr0mtr.h" #include "mtr0mtr.h"
#ifdef UNIV_MATERIALIZE
#undef UNIV_INLINE
#define UNIV_INLINE
#endif
/* PAGE HEADER /* PAGE HEADER
=========== ===========
Index page header starts at the first offset left free by the FIL-module */ Index page header starts at the first offset left free by the FIL-module */
typedef byte page_header_t; typedef byte page_header_t;
#else
# include "mach0data.h"
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
#define PAGE_HEADER FSEG_PAGE_DATA /* index page header starts at this #define PAGE_HEADER FSEG_PAGE_DATA /* index page header starts at this
...@@ -1351,11 +1346,6 @@ page_warn_strict_checksum( ...@@ -1351,11 +1346,6 @@ page_warn_strict_checksum(
srv_checksum_algorithm_t page_checksum, srv_checksum_algorithm_t page_checksum,
const page_id_t page_id); const page_id_t page_id);
#ifdef UNIV_MATERIALIZE
#undef UNIV_INLINE
#define UNIV_INLINE UNIV_INLINE_ORIGINAL
#endif
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
#include "page0page.ic" #include "page0page.ic"
......
...@@ -29,18 +29,10 @@ Created 2/2/1994 Heikki Tuuri ...@@ -29,18 +29,10 @@ Created 2/2/1994 Heikki Tuuri
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "mach0data.h" #include "mach0data.h"
#ifdef UNIV_DEBUG
# include "log0recv.h"
#endif /* !UNIV_DEBUG */
#include "rem0cmp.h" #include "rem0cmp.h"
#include "mtr0log.h" #include "mtr0log.h"
#include "page0zip.h" #include "page0zip.h"
#ifdef UNIV_MATERIALIZE
#undef UNIV_INLINE
#define UNIV_INLINE
#endif
/*************************************************************//** /*************************************************************//**
Returns the max trx id field value. */ Returns the max trx id field value. */
UNIV_INLINE UNIV_INLINE
...@@ -1100,9 +1092,4 @@ page_get_instant(const page_t* page) ...@@ -1100,9 +1092,4 @@ page_get_instant(const page_t* page)
} }
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
#ifdef UNIV_MATERIALIZE
#undef UNIV_INLINE
#define UNIV_INLINE UNIV_INLINE_ORIGINAL
#endif
#endif #endif
...@@ -28,27 +28,11 @@ Created June 2005 by Marko Makela ...@@ -28,27 +28,11 @@ Created June 2005 by Marko Makela
#ifndef page0zip_h #ifndef page0zip_h
#define page0zip_h #define page0zip_h
#ifdef UNIV_MATERIALIZE #include "buf0types.h"
# undef UNIV_INLINE
# define UNIV_INLINE
#endif
#ifdef UNIV_INNOCHECKSUM
#include "buf0buf.h"
#include "ut0crc32.h"
#include "buf0checksum.h"
#include "mach0data.h"
#include "zlib.h"
#endif /* UNIV_INNOCHECKSUM */
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "mtr0types.h" #include "mtr0types.h"
#include "page0types.h" #include "page0types.h"
#endif /* !UNIV_INNOCHECKSUM */
#include "buf0types.h"
#ifndef UNIV_INNOCHECKSUM
#include "dict0types.h" #include "dict0types.h"
#include "srv0srv.h" #include "srv0srv.h"
#include "trx0types.h" #include "trx0types.h"
...@@ -563,11 +547,6 @@ void ...@@ -563,11 +547,6 @@ void
page_zip_reset_stat_per_index(); page_zip_reset_stat_per_index();
/*===========================*/ /*===========================*/
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE UNIV_INLINE_ORIGINAL
#endif
#include "page0zip.ic" #include "page0zip.ic"
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
......
...@@ -25,11 +25,6 @@ Compressed page interface ...@@ -25,11 +25,6 @@ Compressed page interface
Created June 2005 by Marko Makela Created June 2005 by Marko Makela
*******************************************************/ *******************************************************/
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE
#endif
#include "page0zip.h" #include "page0zip.h"
#include "mtr0log.h" #include "mtr0log.h"
#include "page0page.h" #include "page0page.h"
...@@ -437,8 +432,3 @@ page_zip_reset_stat_per_index() ...@@ -437,8 +432,3 @@ page_zip_reset_stat_per_index()
mutex_exit(&page_zip_stat_per_index_mutex); mutex_exit(&page_zip_stat_per_index_mutex);
} }
#ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE
# define UNIV_INLINE UNIV_INLINE_ORIGINAL
#endif
...@@ -47,7 +47,6 @@ Created 10/10/1995 Heikki Tuuri ...@@ -47,7 +47,6 @@ Created 10/10/1995 Heikki Tuuri
#include "que0types.h" #include "que0types.h"
#include "trx0types.h" #include "trx0types.h"
#include "srv0conc.h" #include "srv0conc.h"
#include "buf0checksum.h"
#include "fil0fil.h" #include "fil0fil.h"
#include "mysql/psi/mysql_stage.h" #include "mysql/psi/mysql_stage.h"
......
...@@ -175,12 +175,6 @@ ut_2_power_up( ...@@ -175,12 +175,6 @@ ut_2_power_up(
ulint n) /*!< in: number != 0 */ ulint n) /*!< in: number != 0 */
MY_ATTRIBUTE((const)); MY_ATTRIBUTE((const));
/** Determine how many bytes (groups of 8 bits) are needed to
store the given number of bits.
@param b in: bits
@return number of bytes (octets) needed to represent b */
#define UT_BITS_IN_BYTES(b) (((b) + 7) / 8)
/**********************************************************//** /**********************************************************//**
Returns system time. We do not specify the format of the time returned: Returns system time. We do not specify the format of the time returned:
the only way to manipulate it is to use the function ut_difftime. the only way to manipulate it is to use the function ut_difftime.
...@@ -239,6 +233,12 @@ ut_difftime( ...@@ -239,6 +233,12 @@ ut_difftime(
#endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_INNOCHECKSUM */
/** Determine how many bytes (groups of 8 bits) are needed to
store the given number of bits.
@param b in: bits
@return number of bytes (octets) needed to represent b */
#define UT_BITS_IN_BYTES(b) (((b) + 7) / 8)
/** Determines if a number is zero or a power of two. /** Determines if a number is zero or a power of two.
@param[in] n number @param[in] n number
@return nonzero if n is zero or a power of two; zero otherwise */ @return nonzero if n is zero or a power of two; zero otherwise */
......
...@@ -29,6 +29,7 @@ Created 2/2/1994 Heikki Tuuri ...@@ -29,6 +29,7 @@ Created 2/2/1994 Heikki Tuuri
#include "page0cur.h" #include "page0cur.h"
#include "page0zip.h" #include "page0zip.h"
#include "buf0buf.h" #include "buf0buf.h"
#include "buf0checksum.h"
#include "btr0btr.h" #include "btr0btr.h"
#include "srv0srv.h" #include "srv0srv.h"
#include "lock0lock.h" #include "lock0lock.h"
......
...@@ -25,33 +25,31 @@ Compressed page interface ...@@ -25,33 +25,31 @@ Compressed page interface
Created June 2005 by Marko Makela Created June 2005 by Marko Makela
*******************************************************/ *******************************************************/
#include "page0size.h"
#include "page0zip.h" #include "page0zip.h"
#include "page0size.h"
#include "page0page.h"
#include "buf0checksum.h"
/** A BLOB field reference full of zero, for use in assertions and tests. /** A BLOB field reference full of zero, for use in assertions and tests.
Initially, BLOB field references are set to zero, in Initially, BLOB field references are set to zero, in
dtuple_convert_big_rec(). */ dtuple_convert_big_rec(). */
const byte field_ref_zero[UNIV_PAGE_SIZE_MAX] = { 0, }; const byte field_ref_zero[UNIV_PAGE_SIZE_MAX] = { 0, };
#include "ut0crc32.h"
#include "zlib.h"
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
#include "page0page.h"
#include "mtr0log.h" #include "mtr0log.h"
#include "dict0dict.h" #include "dict0dict.h"
#include "btr0cur.h" #include "btr0cur.h"
#include "page0types.h"
#include "log0recv.h" #include "log0recv.h"
#include "row0row.h" #include "row0row.h"
#include "zlib.h"
#include "buf0buf.h"
#include "buf0types.h"
#include "buf0checksum.h"
#include "btr0sea.h" #include "btr0sea.h"
#include "dict0boot.h" #include "dict0boot.h"
#include "lock0lock.h" #include "lock0lock.h"
#include "srv0srv.h" #include "srv0srv.h"
#include "buf0lru.h" #include "buf0lru.h"
#include "srv0mon.h" #include "srv0mon.h"
#include "ut0crc32.h"
#include <map> #include <map>
#include <algorithm> #include <algorithm>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment