diff options
Diffstat (limited to 'storage/innobase/include/page0types.h')
-rw-r--r-- | storage/innobase/include/page0types.h | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h index 4d6aabfd576..d18cea66b30 100644 --- a/storage/innobase/include/page0types.h +++ b/storage/innobase/include/page0types.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2019, 2020, MariaDB Corporation. +Copyright (c) 2019, 2021, MariaDB Corporation. 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 @@ -88,26 +88,41 @@ enum page_cur_mode_t { PAGE_CUR_RTREE_GET_FATHER = 14 }; +class buf_pool_t; +class buf_page_t; + /** Compressed page descriptor */ struct page_zip_des_t { page_zip_t* data; /*!< compressed page data */ -#ifdef UNIV_DEBUG - unsigned m_start:16; /*!< start offset of modification log */ - bool m_external; /*!< Allocated externally, not from the - buffer pool */ -#endif /* UNIV_DEBUG */ - unsigned m_end:16; /*!< end offset of modification log */ - unsigned m_nonempty:1; /*!< TRUE if the modification log + uint32_t m_end:16; /*!< end offset of modification log */ + uint32_t m_nonempty:1; /*!< TRUE if the modification log is not empty */ - unsigned n_blobs:12; /*!< number of externally stored + uint32_t n_blobs:12; /*!< number of externally stored columns on the page; the maximum is 744 on a 16 KiB page */ - unsigned ssize:PAGE_ZIP_SSIZE_BITS; + uint32_t ssize:PAGE_ZIP_SSIZE_BITS; /*!< 0 or compressed page shift size; the size in bytes is (UNIV_ZIP_SIZE_MIN >> 1) << ssize. */ +#ifdef UNIV_DEBUG + uint16_t m_start; /*!< start offset of modification log */ + bool m_external; /*!< Allocated externally, not from the + buffer pool */ +#endif /* UNIV_DEBUG */ + + void clear() { + memset((void*) this, 0, sizeof(data) + sizeof(uint32_t)); + ut_d(m_start = 0); + ut_d(m_external = false); + } + +private: + friend buf_pool_t; + friend buf_page_t; + /** fix count and state used in buf_page_t */ + Atomic_relaxed<uint32_t> fix; }; /** Compression statistics for a given page size */ |