diff options
author | Daniel Black <daniel@mariadb.org> | 2022-11-07 15:58:40 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2022-11-11 10:21:28 +1100 |
commit | dc6a0171110741d633cef7877013d8e29d5e6def (patch) | |
tree | d5217f68d475e7cb034a8a6ac8b0448520393d20 /storage/innobase/include | |
parent | 0235a528e3c2cf8c3197e4817596c9fa1947d2b8 (diff) | |
download | mariadb-git-dc6a0171110741d633cef7877013d8e29d5e6def.tar.gz |
MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message
Per fsp0types.h, SDI is on tablespace flags position 14 where MariaDB
stores its pagesize. Flag at position 13, also in MariaDB pagesize
flags, is a MySQL encryption flag.
These are checked only if fsp_flags_is_valid fails, so valid MariaDB
pages sizes don't become errors.
The error message "Cannot reset LSNs in table" was rather specific and
not always true to replaced with more generic error.
ALTER TABLE tbl IMPORT TABLESPACE now reports Unsupported on MySQL
tablespace (rather than index corrupted) along with a server error
message.
MySQL innodb Errors are with with UNSUPPORTED rather than CORRUPTED
to avoid user anxiety.
Reviewer: Marko Mäkelä
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/fsp0fsp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h index eff1b4ab4ae..d8057e8e4bf 100644 --- a/storage/innobase/include/fsp0fsp.h +++ b/storage/innobase/include/fsp0fsp.h @@ -755,6 +755,20 @@ fsp_flags_match(ulint expected, ulint actual) return(actual == expected); } +/** Determine if FSP_SPACE_FLAGS are from an incompatible MySQL format. +@param flags the contents of FSP_SPACE_FLAGS +@return MySQL flags shifted. +@retval 0, if not a MySQL incompatible format. */ +MY_ATTRIBUTE((warn_unused_result, const)) +inline ulint fsp_flags_is_incompatible_mysql(ulint flags) +{ + /* + MySQL-8.0 SDI flag (bit 14), + or MySQL 5.7 Encyption flag (bit 13) + */ + return flags >> 13 & 3; +} + /** Calculates the descriptor index within a descriptor page. @param[in] page_size page size @param[in] offset page offset |