summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-11-04 09:55:35 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-11-04 09:55:35 +0200
commit576afceadd4d72665c249f21c78ad00166b4dc37 (patch)
tree953ff9bf7fda1d9a0dd7de0c5b80d65e100ca5c3 /mysql-test/suite/sys_vars
parent993b8edf3fafc3c66aa265e445aac1c6421a29fd (diff)
downloadmariadb-git-576afceadd4d72665c249f21c78ad00166b4dc37.tar.gz
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.
Diffstat (limited to 'mysql-test/suite/sys_vars')
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test106
3 files changed, 0 insertions, 171 deletions
diff --git a/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result
deleted file mode 100644
index bc9b7019eb8..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result
+++ /dev/null
@@ -1,53 +0,0 @@
-'#---------------------BS_STVARS_031_01----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
-COUNT(@@GLOBAL.innodb_force_load_corrupted)
-1
-1 Expected
-'#---------------------BS_STVARS_031_02----------------------#'
-SET @@GLOBAL.innodb_force_load_corrupted=1;
-ERROR HY000: Variable 'innodb_force_load_corrupted' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
-COUNT(@@GLOBAL.innodb_force_load_corrupted)
-1
-1 Expected
-'#---------------------BS_STVARS_031_03----------------------#'
-SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_force_load_corrupted';
-IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
-COUNT(@@GLOBAL.innodb_force_load_corrupted)
-1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_force_load_corrupted';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_031_04----------------------#'
-SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted;
-@@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted
-1
-1 Expected
-'#---------------------BS_STVARS_031_05----------------------#'
-SELECT COUNT(@@innodb_force_load_corrupted);
-COUNT(@@innodb_force_load_corrupted)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_force_load_corrupted);
-ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_force_load_corrupted);
-ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
-COUNT(@@GLOBAL.innodb_force_load_corrupted)
-1
-1 Expected
-SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted;
-ERROR 42S22: Unknown column 'innodb_force_load_corrupted' in 'field list'
-Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 33df36dfb3b..221a6de049a 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -765,18 +765,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
-VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
-SESSION_VALUE NULL
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Force InnoDB to load metadata of corrupted table.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_PRIMARY_KEY
SESSION_VALUE NULL
DEFAULT_VALUE OFF
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
deleted file mode 100644
index f12f2f670a4..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-################## mysql-test\t\innodb_force_load_corrupted_basic.test #####
-# #
-# Variable Name: innodb_force_load_corrupted #
-# Scope: Global #
-# Access Type: Static #
-# Data Type: boolean #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
-# #
-# #
-# Description:Test Cases of Dynamic System Variable innodb_force_load_corrupted#
-# that checks the behavior of this variable in the following ways #
-# * Value Check #
-# * Scope Check #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/have_innodb.inc
-
---echo '#---------------------BS_STVARS_031_01----------------------#'
-####################################################################
-# Displaying default value #
-####################################################################
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
---echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_031_02----------------------#'
-####################################################################
-# Check if Value can set #
-####################################################################
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_force_load_corrupted=1;
---echo Expected error 'Read only variable'
-
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
---echo 1 Expected
-
-
-
-
---echo '#---------------------BS_STVARS_031_03----------------------#'
-#################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-#################################################################
-
---disable_warnings
-SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_force_load_corrupted';
---enable_warnings
---echo 1 Expected
-
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
---echo 1 Expected
-
---disable_warnings
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_force_load_corrupted';
---enable_warnings
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_031_04----------------------#'
-################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-################################################################################
-SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted;
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_031_05----------------------#'
-################################################################################
-# Check if innodb_force_load_corrupted can be accessed with and without @@ sign #
-################################################################################
-
-SELECT COUNT(@@innodb_force_load_corrupted);
---echo 1 Expected
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_force_load_corrupted);
---echo Expected error 'Variable is a GLOBAL variable'
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_force_load_corrupted);
---echo Expected error 'Variable is a GLOBAL variable'
-
-SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
---echo 1 Expected
-
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted;
---echo Expected error 'Readonly variable'
-
-