From c97a7cdbd04e73fda85207b8ca8238ed1f7508c9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 9 Nov 2017 20:51:11 +0100 Subject: remove redundant tests from mysql-test/include/*.inc files Some tests are skipped by checks in suite.pm. It is redundant to have an sql-level run-time check in the .inc file itself. In some cases it's not only redundant, but dangerous. After one bug in 10.2 innodb.create_isl_with_direct failed to start InnoDB, but the server started fine (just without InnoDB) and instead of failing, the test was skipped by run-time check in have_innodb.inc. # Conflicts: # mysql-test/include/not_embedded.inc # mysql-test/r/change_user_notembedded.result # mysql-test/suite.pm # mysql-test/t/change_user_notembedded.test --- mysql-test/include/have_debug.inc | 5 ----- mysql-test/include/have_example_plugin.inc | 14 ++------------ mysql-test/include/have_innodb.inc | 6 ------ mysql-test/include/have_xtradb.inc | 7 ------- mysql-test/include/not_embedded.inc | 6 ------ mysql-test/include/not_windows.inc | 8 ++++---- mysql-test/r/not_windows.require | 2 -- 7 files changed, 6 insertions(+), 42 deletions(-) delete mode 100644 mysql-test/r/not_windows.require diff --git a/mysql-test/include/have_debug.inc b/mysql-test/include/have_debug.inc index 5df3080a6ed..a035031e49a 100644 --- a/mysql-test/include/have_debug.inc +++ b/mysql-test/include/have_debug.inc @@ -2,8 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is a debug build. # -# The test below is redundant - -if (`select version() not like '%debug%'`) { - --skip Needs a debug build -} diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index 5571c345850..c0da490dde0 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -1,14 +1,4 @@ # -# Check if server has support for loading plugins +# suite.pm will make sure that all tests including this file +# will be skipped unless dynamic ha_example plugin is available # -if (`SELECT @@have_dynamic_loading != 'YES'`) { - --skip Example plugin requires dynamic loading -} - -# -# Check if the variable EXAMPLE_PLUGIN is set -# -if (!$HA_EXAMPLE_SO) { - --skip Need example plugin -} - diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 021970423cd..b89797d5828 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless innodb or xtradb is enabled # -# The test below is redundant - -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) -{ - --skip Test requires InnoDB. -} diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc index 478b9926e21..d12802e057d 100644 --- a/mysql-test/include/have_xtradb.inc +++ b/mysql-test/include/have_xtradb.inc @@ -2,10 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless xtradb is enabled # -# The test below is redundant - -if (!`SELECT count(*) FROM information_schema.plugins WHERE - plugin_name = 'innodb' AND plugin_status = 'active' AND - plugin_description LIKE '%xtradb%'`){ - skip Needs XtraDB engine; -} diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc index 88185af3b15..4c168f71979 100644 --- a/mysql-test/include/not_embedded.inc +++ b/mysql-test/include/not_embedded.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is an embedded test run # -# The test below is redundant - -if (`select version() like '%embedded%'`) { - This should never happen; -} - diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc index 9240271077a..08373095438 100644 --- a/mysql-test/include/not_windows.inc +++ b/mysql-test/include/not_windows.inc @@ -1,4 +1,4 @@ ---require r/not_windows.require -disable_query_log; -select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE"; -enable_query_log; +# +# suite.pm will make sure that all tests including this file +# will be skipped unless this is on Windows +# diff --git a/mysql-test/r/not_windows.require b/mysql-test/r/not_windows.require deleted file mode 100644 index 09aae1ed1d0..00000000000 --- a/mysql-test/r/not_windows.require +++ /dev/null @@ -1,2 +0,0 @@ -TRUE -1 -- cgit v1.2.1