From 576afceadd4d72665c249f21c78ad00166b4dc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 4 Nov 2021 09:55:35 +0200 Subject: MDEV-26966: Remove innodb_force_load_corrupted MySQL 5.5 in commit 177d8b0c125b841c0650d27d735e3b87509dc286 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 1bc9cce70273c7f4705fb193abd2c938e3f3402a) 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. --- sql/mysqld.cc | 3 +++ sql/upgrade_conf_file.cc | 1 + 2 files changed, 4 insertions(+) (limited to 'sql') diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f7717e188ee..efdc3c8dcae 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5105,6 +5105,9 @@ static int init_server_components() MYSQL_COMPATIBILITY_OPTION("new"), MYSQL_COMPATIBILITY_OPTION("show_compatibility_56"), + /* The following options were removed in 10.6 */ + MARIADB_REMOVED_OPTION("innodb-force-load-corrupted"), + /* The following options were removed in 10.5 */ #if defined(__linux__) MARIADB_REMOVED_OPTION("super-large-pages"), diff --git a/sql/upgrade_conf_file.cc b/sql/upgrade_conf_file.cc index a30502d0dea..543df7b9bdf 100644 --- a/sql/upgrade_conf_file.cc +++ b/sql/upgrade_conf_file.cc @@ -80,6 +80,7 @@ static const char *removed_variables[] = "innodb_file_format_check", "innodb_file_format_max", "innodb_flush_neighbor_pages", +"innodb_force_load_corrupted", "innodb_foreground_preflush", "innodb_ibuf_accel_rate", "innodb_ibuf_active_contract", -- cgit v1.2.1