Skip to content

Commit 576afce

Browse files
committed
MDEV-26966: Remove innodb_force_load_corrupted
MySQL 5.5 in commit 177d8b0 introduced a configuration parameter innodb_force_load_corrupted whose purpose was to allow a corrupted table to be dropped. Given that MDEV-11412 in MariaDB 10.5.4 aims to allow any metadata for a missing or corrupted table to be dropped, and given that MDEV-17567 and MDEV-25506 and related tasks made DDL operations crash-safe, the parameter no longer serves any purpose. Because this obscure parameter was read-only (not settable by a client), it seems that we can simply declare it with MARIADB_REMOVED_OPTION (commit 1bc9cce) without breaking any upgrades. DICT_ERR_IGNORE_INDEX: Replaces DICT_ERR_IGNORE_INDEX_ROOT and DICT_ERR_IGNORE_CORRUPT, which were always set equally. dict_load_indexes(): Report "No indexes found for table" in a uniform way, and only when the DICT_ERR_IGNORE_INDEX flag is not set. If the clustered index is marked corrupted, and the operation is DICT_ERR_IGNORE_DROP (we are about to drop the table), we will load the metadata; else, we will return DB_INDEX_CORRUPT. If SYS_INDEXES.PAGE is FIL_NULL, report an error or warning unless we are about to drop the table. dict_load_table_one(): Simplify the logic.
1 parent 993b8ed commit 576afce

File tree

9 files changed

+64
-318
lines changed

9 files changed

+64
-318
lines changed

mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result

Lines changed: 0 additions & 53 deletions
This file was deleted.

mysql-test/suite/sys_vars/r/sysvars_innodb.result

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -765,18 +765,6 @@ NUMERIC_BLOCK_SIZE NULL
765765
ENUM_VALUE_LIST OFF,ON
766766
READ_ONLY NO
767767
COMMAND_LINE_ARGUMENT NONE
768-
VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
769-
SESSION_VALUE NULL
770-
DEFAULT_VALUE OFF
771-
VARIABLE_SCOPE GLOBAL
772-
VARIABLE_TYPE BOOLEAN
773-
VARIABLE_COMMENT Force InnoDB to load metadata of corrupted table.
774-
NUMERIC_MIN_VALUE NULL
775-
NUMERIC_MAX_VALUE NULL
776-
NUMERIC_BLOCK_SIZE NULL
777-
ENUM_VALUE_LIST OFF,ON
778-
READ_ONLY YES
779-
COMMAND_LINE_ARGUMENT NONE
780768
VARIABLE_NAME INNODB_FORCE_PRIMARY_KEY
781769
SESSION_VALUE NULL
782770
DEFAULT_VALUE OFF

mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test

Lines changed: 0 additions & 106 deletions
This file was deleted.

sql/mysqld.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5105,6 +5105,9 @@ static int init_server_components()
51055105
MYSQL_COMPATIBILITY_OPTION("new"),
51065106
MYSQL_COMPATIBILITY_OPTION("show_compatibility_56"),
51075107

5108+
/* The following options were removed in 10.6 */
5109+
MARIADB_REMOVED_OPTION("innodb-force-load-corrupted"),
5110+
51085111
/* The following options were removed in 10.5 */
51095112
#if defined(__linux__)
51105113
MARIADB_REMOVED_OPTION("super-large-pages"),

sql/upgrade_conf_file.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ static const char *removed_variables[] =
8080
"innodb_file_format_check",
8181
"innodb_file_format_max",
8282
"innodb_flush_neighbor_pages",
83+
"innodb_force_load_corrupted",
8384
"innodb_foreground_preflush",
8485
"innodb_ibuf_accel_rate",
8586
"innodb_ibuf_active_contract",

0 commit comments

Comments
 (0)