diff options
Diffstat (limited to 'storage/xtradb/include/fsp0fsp.h')
-rw-r--r-- | storage/xtradb/include/fsp0fsp.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h index b31a7574529..c8359473670 100644 --- a/storage/xtradb/include/fsp0fsp.h +++ b/storage/xtradb/include/fsp0fsp.h @@ -787,12 +787,11 @@ fseg_print( /** Validate the tablespace flags, which are stored in the tablespace header at offset FSP_SPACE_FLAGS. @param[in] flags the contents of FSP_SPACE_FLAGS -@param[in] is_ibd whether this is an .ibd file (not system tablespace) @return whether the flags are correct (not in the buggy 10.1) format */ MY_ATTRIBUTE((warn_unused_result, const)) UNIV_INLINE bool -fsp_flags_is_valid(ulint flags, bool is_ibd) +fsp_flags_is_valid(ulint flags) { DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", return(false);); @@ -816,7 +815,7 @@ fsp_flags_is_valid(ulint flags, bool is_ibd) bits 10..14 would be nonzero 0bsssaa where sss is nonzero PAGE_SSIZE (3, 4, 6, or 7) and aa is ATOMIC_WRITES (not 0b11). */ - if (FSP_FLAGS_GET_RESERVED(flags) & ~1U) { + if (FSP_FLAGS_GET_RESERVED(flags) & ~1) { return(false); } @@ -839,12 +838,7 @@ fsp_flags_is_valid(ulint flags, bool is_ibd) return(false); } - /* The flags do look valid. But, avoid misinterpreting - buggy MariaDB 10.1 format flags for - PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL={0,2,3} - as valid-looking PAGE_SSIZE if this is known to be - an .ibd file and we are using the default innodb_page_size=16k. */ - return(ssize == 0 || !is_ibd || srv_page_size != UNIV_PAGE_SIZE_ORIG); + return(true); } /** Convert FSP_SPACE_FLAGS from the buggy MariaDB 10.1.0..10.1.20 format. @@ -953,7 +947,7 @@ fsp_flags_convert_from_101(ulint flags) flags = ((flags & 0x3f) | ssize << FSP_FLAGS_POS_PAGE_SSIZE | FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) << FSP_FLAGS_POS_PAGE_COMPRESSION); - ut_ad(fsp_flags_is_valid(flags, false)); + ut_ad(fsp_flags_is_valid(flags)); return(flags); } @@ -967,7 +961,7 @@ bool fsp_flags_match(ulint expected, ulint actual) { expected &= ~FSP_FLAGS_MEM_MASK; - ut_ad(fsp_flags_is_valid(expected, false)); + ut_ad(fsp_flags_is_valid(expected)); if (actual == expected) { return(true); |