diff options
Diffstat (limited to 'storage/innobase/include/mtr0log.h')
-rw-r--r-- | storage/innobase/include/mtr0log.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/innobase/include/mtr0log.h b/storage/innobase/include/mtr0log.h index 82fbca10721..8192c93a8f9 100644 --- a/storage/innobase/include/mtr0log.h +++ b/storage/innobase/include/mtr0log.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2019, 2021, MariaDB Corporation. +Copyright (c) 2019, 2022, 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 @@ -24,6 +24,9 @@ Mini-transaction log record encoding and decoding #pragma once #include "mtr0mtr.h" +/** The smallest invalid page identifier for persistent tablespaces */ +constexpr page_id_t end_page_id{SRV_SPACE_ID_UPPER_BOUND, 0}; + /** The minimum 2-byte integer (0b10xxxxxx xxxxxxxx) */ constexpr uint32_t MIN_2BYTE= 1 << 7; /** The minimum 3-byte integer (0b110xxxxx xxxxxxxx xxxxxxxx) */ @@ -388,6 +391,7 @@ inline byte *mtr_t::log_write(const page_id_t id, const buf_page_t *bpage, type <= FILE_CHECKPOINT, "invalid type"); ut_ad(type >= FILE_CREATE || is_named_space(id.space())); ut_ad(!bpage || bpage->id() == id); + ut_ad(id < end_page_id); constexpr bool have_len= type != INIT_PAGE && type != FREE_PAGE; constexpr bool have_offset= type == WRITE || type == MEMSET || type == MEMMOVE; |