Commit 164dedba authored by Vasil Dimov's avatar Vasil Dimov

Move the InnoDB Plugin tests from storage/innodb_plugin/mysql-test/ where

they are ignored to a new test suite "innodb_plugin".

Remove a hack in mtr that was deployed to run the builtin InnoDB tests against
the InnoDB Plugin. Also detect if a test is an 'innodb plugin test' and if so
then transparently replace the builtin InnoDB with the InnoDB Plugin.
parent 91600911
disable_query_log;
--require r/true.require
SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
enable_query_log;
......@@ -70,7 +70,6 @@ my $skip_test_reg;
# Related to adding InnoDB plugin combinations
my $lib_innodb_plugin;
my $do_innodb_plugin;
# If "Quick collect", set to 1 once a test to run has been found.
my $some_test_found;
......@@ -114,9 +113,6 @@ sub collect_test_cases ($$$) {
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
"ha_innodb_plugin.sl"],
NOT_REQUIRED);
$do_innodb_plugin= ($::mysql_version_id >= 50100 &&
!(IS_WINDOWS && $::opt_embedded_server) &&
$lib_innodb_plugin);
# If not reordering, we also shouldn't group by suites, unless
# no test cases were named.
......@@ -504,73 +500,6 @@ sub collect_one_suite($)
}
}
# ----------------------------------------------------------------------
# Testing InnoDB plugin.
# ----------------------------------------------------------------------
if ($do_innodb_plugin)
{
my @new_cases;
my $sep= (IS_WINDOWS) ? ';' : ':';
foreach my $test (@cases)
{
next if (!$test->{'innodb_test'});
# If skipped due to no builtin innodb, we can still run it with plugin
next if ($test->{'skip'} && $test->{comment} ne "No innodb support");
# Exceptions
next if ($test->{'name'} eq 'main.innodb'); # Failed with wrong errno (fk)
next if ($test->{'name'} eq 'main.index_merge_innodb'); # Explain diff
# innodb_file_per_table is rw with innodb_plugin
next if ($test->{'name'} eq 'sys_vars.innodb_file_per_table_basic');
# innodb_lock_wait_timeout is rw with innodb_plugin
next if ($test->{'name'} eq 'sys_vars.innodb_lock_wait_timeout_basic');
# Diff around innodb_thread_concurrency variable
next if ($test->{'name'} eq 'sys_vars.innodb_thread_concurrency_basic');
# Can't work with InnoPlug. Test framework needs to be re-designed.
next if ($test->{'name'} eq 'main.innodb_bug46000');
# Fails with innodb plugin
next if ($test->{'name'} eq 'main.innodb-autoinc');
# Fails with innodb plugin: r6185 Testcases changes not included
next if ($test->{'name'} eq 'main.innodb_bug44369');
# Fix for BUG47621 is not in InnoDB plugin
next if ($test->{'name'} eq 'main.innodb_bug21704');
next if ($test->{'name'} eq 'main.innodb_bug47621');
# Copy test options
my $new_test= My::Test->new();
while (my ($key, $value) = each(%$test))
{
if (ref $value eq "ARRAY")
{
push(@{$new_test->{$key}}, @$value);
}
else
{
$new_test->{$key}= $value unless ($key eq 'skip');
}
}
my $plugin_filename= basename($lib_innodb_plugin);
my $plugin_list= "innodb=$plugin_filename" . $sep . "innodb_locks=$plugin_filename";
push(@{$new_test->{master_opt}}, '--ignore-builtin-innodb');
push(@{$new_test->{master_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$new_test->{master_opt}}, "--plugin_load=$plugin_list");
push(@{$new_test->{slave_opt}}, '--ignore-builtin-innodb');
push(@{$new_test->{slave_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$new_test->{slave_opt}}, "--plugin_load=$plugin_list");
if ($new_test->{combination})
{
$new_test->{combination}.= '+innodb_plugin';
}
else
{
$new_test->{combination}= 'innodb_plugin';
}
push(@new_cases, $new_test);
}
push(@cases, @new_cases);
}
# ----------------------------------------------------------------------
# End of testing InnoDB plugin.
# ----------------------------------------------------------------------
optimize_cases(\@cases);
#print_testcases(@cases);
......@@ -1005,11 +934,39 @@ sub collect_one_test_case {
{
# innodb is not supported, skip it
$tinfo->{'skip'}= 1;
# This comment is checked for running with innodb plugin (see above),
# please keep that in mind if changing the text.
$tinfo->{'comment'}= "No innodb support";
# But continue processing if we may run it with innodb plugin
return $tinfo unless $do_innodb_plugin;
return $tinfo;
}
}
elsif ( $tinfo->{'innodb_plugin_test'} )
{
# This is a test that needs the innodb plugin
if ( $::mysqld_variables{'innodb'} eq "OFF" ||
! exists $::mysqld_variables{'innodb'} )
{
# innodb plugin is not supported, skip it
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "No innodb plugin support";
return $tinfo;
}
my $sep= (IS_WINDOWS) ? ';' : ':';
my $plugin_filename= basename($lib_innodb_plugin);
my $plugin_list=
"innodb=$plugin_filename$sep" .
"innodb_trx=$plugin_filename$sep" .
"innodb_locks=$plugin_filename$sep" .
"innodb_lock_waits=$plugin_filename$sep" .
"innodb_cmp=$plugin_filename$sep" .
"innodb_cmp_reset=$plugin_filename$sep" .
"innodb_cmpmem=$plugin_filename$sep" .
"innodb_cmpmem_reset=$plugin_filename";
foreach my $k ('master_opt', 'slave_opt')
{
push(@{$tinfo->{$k}}, '--ignore-builtin-innodb');
push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list");
}
}
else
......@@ -1137,6 +1094,7 @@ my @tags=
["include/have_log_bin.inc", "need_binlog", 1],
["include/have_innodb.inc", "innodb_test", 1],
["include/have_innodb_plugin.inc", "innodb_plugin_test", 1],
["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1],
["include/have_ndb.inc", "ndb_test", 1],
......
......@@ -3,7 +3,7 @@
# different values of the parameter innodb_stats_sample_pages.
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
# we care only that the following SQL commands do not produce errors
# and do not crash the server
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
......
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
--disable_warnings
drop table if exists t1;
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
let $MYSQLD_DATADIR= `select @@datadir`;
......@@ -163,7 +163,7 @@ select * from t2;
drop table t2,t4,t3,t1;
-- let charset = utf8
-- source include/innodb-index.inc
-- source suite/innodb_plugin/include/innodb-index.inc
create table t1(a int not null, b int) engine = innodb;
insert into t1 values (1,1),(1,1),(1,1),(1,1);
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
-- source include/have_ucs2.inc
-- let charset = ucs2
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
#
# Check and select innodb lock type
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
......
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
--disable_warnings
drop table if exists t1;
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
let $timeout=`select @@innodb_lock_wait_timeout`;
set global innodb_lock_wait_timeout=42;
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
......
......@@ -13,7 +13,7 @@
# #
#######################################################################
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
let $MYSQLD_DATADIR= `select @@datadir`;
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
......
......@@ -3,7 +3,7 @@
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/34300
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
-- disable_query_log
-- disable_result_log
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/35220
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/36169
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
......
......@@ -3,7 +3,7 @@
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/38231
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......
......@@ -7,7 +7,7 @@
# works with innodb_file_per_table.
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......
......@@ -3,7 +3,7 @@
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET TX_ISOLATION='READ-COMMITTED';
......
# Bug #40565 Update Query Results in "1 Row Affected" But Should Be "Zero Rows"
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
create table bug40565(value decimal(4,2)) engine=innodb;
insert into bug40565 values (1), (null);
......
......@@ -3,7 +3,7 @@
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB;
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/42101
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
--error ER_WRONG_ARGUMENTS
set global innodb_commit_concurrency=0;
......
......@@ -3,7 +3,7 @@
# http://bugs.mysql.com/42101
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
......
......@@ -2,7 +2,7 @@
# (btr_cur_update_in_place not invoked when updating from/to NULL;
# the update is performed by delete and insert instead)
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
CREATE TABLE bug44032(c CHAR(3) CHARACTER SET UTF8) ROW_FORMAT=REDUNDANT
ENGINE=InnoDB;
......
......@@ -4,7 +4,7 @@
# Please also refer to related fix in
# http://bugs.mysql.com/47621
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
ALTER TABLE bug44571 CHANGE foo bar INT;
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
set session transaction isolation level read committed;
......
......@@ -2,7 +2,7 @@
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
INSERT INTO bug51920 VALUES (1);
......
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
select @@innodb_file_format;
select @@innodb_file_format_check;
......
......@@ -3,7 +3,7 @@
# INFORMATION_SCHEMA.innodb_locks.lock_data
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
-- disable_query_log
-- disable_result_log
......
......@@ -6,7 +6,7 @@
# be heavier than ones that had not.
#
-- source include/have_innodb.inc
-- source include/have_innodb_plugin.inc
SET storage_engine=InnoDB;
......@@ -65,21 +65,21 @@ INSERT INTO t3 SELECT * FROM t3;
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1), (1), (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
# test weight when non-transactional tables are edited
......@@ -88,14 +88,14 @@ INSERT INTO t3 SELECT * FROM t3;
-- let $con2_extra_sql =
-- let $con2_extra_sql_present = 0
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1)
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1)
-- let $con1_extra_sql = $con1_extra_sql; INSERT INTO t5_nontrans VALUES (1)
......@@ -103,6 +103,6 @@ INSERT INTO t3 SELECT * FROM t3;
-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1)
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
-- source suite/innodb_plugin/include/innodb_trx_weight.inc
DROP TABLE t1, t2, t3, t4, t5_nontrans;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment