summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-02-07 16:22:36 +0100
committerSergei Golubchik <sergii@pisem.net>2012-02-07 16:22:36 +0100
commit2682a280c8095a367fc8cbe2c1323ba4340f75e8 (patch)
tree4c6aeb798dcb963b0df31cf3da1e823a70d67608
parente83dd9b517239dedb727263c7eeda89ada6d4c57 (diff)
downloadmariadb-git-2682a280c8095a367fc8cbe2c1323ba4340f75e8.tar.gz
allow suite.pm to skip combinations that originate from test/include files.
storage/innobase/handler/handler0alter.cc: for NEWDATE key_type says unsigned, thus col->prtype says unsigned, but field->flags says signed. Use the same flag for value retrieval that was used for value storage.
-rw-r--r--mysql-test/README.suites21
-rw-r--r--mysql-test/include/have_innodb.combinations (renamed from mysql-test/suite/innodb/combinations)0
-rw-r--r--mysql-test/include/have_innodb.opt2
-rw-r--r--mysql-test/include/innodb_rollback_on_timeout.inc1
-rw-r--r--mysql-test/lib/My/Suite.pm1
-rw-r--r--mysql-test/lib/mtr_cases.pm61
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-rw-r--r--mysql-test/r/innodb_bug878769,innodb_plugin.rdiff11
-rw-r--r--mysql-test/r/innodb_icp,innodb_plugin.rdiff85
-rw-r--r--mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff111
-rw-r--r--mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff20
-rw-r--r--mysql-test/r/type_bit_innodb.result2
-rw-r--r--mysql-test/suite.pm16
-rw-r--r--mysql-test/suite/federated/suite.pm17
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_innodb,innodb_plugin.rdiff11
-rw-r--r--mysql-test/suite/innodb/suite.pm19
-rw-r--r--mysql-test/suite/innodb/t/binlog_consistent.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_binlog_pos.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-analyze.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-18274.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-44030.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-56228.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-optimize.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-consistent.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-create-options.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-index_ucs2.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-lock.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-replace.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-semi-consistent.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-timeout.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-truncate.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-ucs2.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-zip.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug21704.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30423.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30919.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34053.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34300.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug35220.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug36169.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug36172.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug38231.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug39438.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug40360.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug40565.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug41904.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42419.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44032.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44369.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44571.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug45357.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug46000.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug46676.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47167.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47621.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47622.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47777.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug48024.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug49164.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug51378.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug51920.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52199.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52663.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52745.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53046.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53290.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53591.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53592.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53674.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53756.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56143.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56680.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56716.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56947.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug57252.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug57255.test1
-rwxr-xr-xmysql-test/suite/innodb/t/innodb_bug57904.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug59410.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug59641.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049.test1
-rwxr-xr-xmysql-test/suite/innodb/t/innodb_bug60196.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_cmp_drop_table.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_file_format.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_index_large_prefix.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_multi_update.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql_rbk.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_notembedded.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_trx_weight.test1
-rw-r--r--mysql-test/suite/percona/innodb_fix_misc_bug51325.test2
-rw-r--r--mysql-test/suite/percona/percona_innodb_fake_changes.test2
-rw-r--r--mysql-test/suite/percona/percona_innodb_fake_changes_locks.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_binlog_grant.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ddl.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test1
-rw-r--r--mysql-test/t/index_merge_innodb.test2
-rw-r--r--mysql-test/t/information_schema.test4
-rw-r--r--mysql-test/t/query_cache_debug.test1
-rw-r--r--mysql-test/t/rowid_order_innodb.test2
-rw-r--r--mysql-test/t/type_bit_innodb.test1
-rw-r--r--storage/innobase/handler/handler0alter.cc2
117 files changed, 420 insertions, 72 deletions
diff --git a/mysql-test/README.suites b/mysql-test/README.suites
index d458983b383..1acfee4426f 100644
--- a/mysql-test/README.suites
+++ b/mysql-test/README.suites
@@ -52,7 +52,7 @@ It can also return a string - in this case all tests in the suite
will be skipped, with this string being printed as a reason.
A suite class can define config_files(), servers(), list_cases(),
-and start_test() methods.
+start_test() methods, and skip_combinations() methods.
A config_files() method returns a list of additional config files (besides
my.cnf), that this suite needs to be created. For every file it specifies
@@ -89,6 +89,16 @@ to do it.
A start_test() method starts one test process, by default it will be mysqltest.
See unit suite for an example of list_cases() and start_test() methods.
+
+A skip_combinations() method returns a hash that maps file names
+(where combinations are defined) to a list of combinations that should
+be skipped. For example
+
+ sub skip_combinations { (
+ 'combinations' => [ 'mix', 'rpl' ],
+ 'inc/many.combinations' => [ 'a', 'bb', 'c' ]
+ ) }
+
==========================
A suite can have my.cnf template file in the suitedir.
A my.cnf template uses a normal my.cnf syntax - groups, options,
@@ -152,14 +162,5 @@ merged to a my.cnf, but will be added to the command line. Example:
Such a file will cause every test from the suite to be run twice - once
with mysqld using --opt1=val1 and the other one with mysqld using
--opt1=val2 --opt2=$HAVE_SOMETHING
-
-One can limit mtr run to a subset of combinations by setting environment
-variable SUITENAME_COMBINATIONS to the ':'-separated set of combination
-names. E.g.
-
- RPL_COMBINATIONS=mix:row ./mtr --suite rpl
-
-See innodb suite for an example of how suite.pm may set this variable
-to exclude unsupported configurations.
==========================
diff --git a/mysql-test/suite/innodb/combinations b/mysql-test/include/have_innodb.combinations
index 5051719d92a..5051719d92a 100644
--- a/mysql-test/suite/innodb/combinations
+++ b/mysql-test/include/have_innodb.combinations
diff --git a/mysql-test/include/have_innodb.opt b/mysql-test/include/have_innodb.opt
deleted file mode 100644
index 4fb96229a7b..00000000000
--- a/mysql-test/include/have_innodb.opt
+++ /dev/null
@@ -1,2 +0,0 @@
---loose-innodb
---plugin-load=$HA_XTRADB_SO
diff --git a/mysql-test/include/innodb_rollback_on_timeout.inc b/mysql-test/include/innodb_rollback_on_timeout.inc
index 6be47397e4b..274bbe12566 100644
--- a/mysql-test/include/innodb_rollback_on_timeout.inc
+++ b/mysql-test/include/innodb_rollback_on_timeout.inc
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
# transaction timeout"
diff --git a/mysql-test/lib/My/Suite.pm b/mysql-test/lib/My/Suite.pm
index c63e633ec3b..948187da1e5 100644
--- a/mysql-test/lib/My/Suite.pm
+++ b/mysql-test/lib/My/Suite.pm
@@ -5,6 +5,7 @@ package My::Suite;
sub config_files { () }
sub servers { () }
+sub skip_combinations { () }
sub list_cases {
my ($self, $testdir) = @_;
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 6d8a515bb3a..819248be386 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -212,11 +212,43 @@ sub split_testname {
mtr_error("Illegal format of test name: $test_name");
}
+my %suite_combinations;
+my %skip_combinations;
+my %file_combinations;
+
+sub load_suite_object {
+ my ($suite, $suitedir) = @_;
+ unless ($suites{$suite}) {
+ if (-f "$suitedir/suite.pm") {
+ $suites{$suite} = do "$suitedir/suite.pm";
+ return unless ref $suites{$suite};
+ } else {
+ $suites{$suite} = $default_suite_object;
+ }
+ my %suite_skiplist = $suites{$suite}->skip_combinations();
+ while (my ($file, $skiplist) = each %suite_skiplist) {
+ $skip_combinations{"$suitedir/$file => $_"} = 1 for (@$skiplist);
+ }
+ }
+}
+
+# returns a pair of (suite, suitedir)
+sub find_suite_of_file($) {
+ my ($file) = @_;
+ return ($2, $1)
+ if $file =~ m@^(.*/(?:storage|plugin)/\w+/mysql-test/(\w+))/@;
+ return ($2, $1) if $file =~ m@^(.*/mysql-test/suite/(\w+))/@;
+ return ('main', $1) if $file =~ m@^(.*/mysql-test)/@;
+ mtr_error("Cannot determine suite for $file");
+}
+
sub combinations_from_file($)
{
my ($filename) = @_;
return () if @::opt_combinations or not -f $filename;
+ load_suite_object(find_suite_of_file($filename));
+
# Read combinations file in my.cnf format
mtr_verbose("Read combinations file");
my $config= My::Config->new($filename);
@@ -224,6 +256,7 @@ sub combinations_from_file($)
foreach my $group ($config->groups()) {
next if $group->auto();
my $comb= { name => $group->name() };
+ next if $skip_combinations{"$filename => $comb->{name}"};
foreach my $option ( $group->options() ) {
push(@{$comb->{comb_opt}}, $option->option());
}
@@ -232,9 +265,6 @@ sub combinations_from_file($)
@combs;
}
-my $suite_combinations = { };
-my $file_combinations = { };
-
sub collect_one_suite
{
my $suite= shift; # Test suite name
@@ -300,16 +330,7 @@ sub collect_one_suite
mtr_verbose("testdir: $testdir");
mtr_verbose("resdir: $resdir");
- #
- # Load the Suite object
- #
- unless ($suites{$suite}) {
- if (-f "$suitedir/suite.pm") {
- $suites{$suite} = do "$suitedir/suite.pm";
- } else {
- $suites{$suite} = $default_suite_object;
- }
- }
+ load_suite_object($suite, $suitedir);
# ----------------------------------------------------------------------
# Build a hash of disabled testcases for this suite
@@ -369,15 +390,13 @@ sub collect_one_suite
my $comb= {};
$comb->{name}= $combination;
push(@{$comb->{comb_opt}}, $combination);
- push @{$suite_combinations->{$suite}}, $comb;
+ push @{$suite_combinations{$suite}}, $comb;
}
}
else
{
my @combs = combinations_from_file("$suitedir/combinations");
- my %env_filter = map { $_ => 1 } split /:/, $ENV{"\U${suite}_COMBINATIONS"};
- @combs = grep $env_filter{$_->{name}}, @combs if %env_filter;
- $suite_combinations->{$suite} = [ @combs ];
+ $suite_combinations{$suite} = [ @combs ];
}
}
@@ -851,8 +870,8 @@ sub collect_one_test_case {
process_opts($tinfo, 'slave_opt');
my @cases = ($tinfo);
- for my $comb ($suite_combinations->{$suitename},
- @{$file_combinations->{$filename}})
+ for my $comb ($suite_combinations{$suitename},
+ @{$file_combinations{$filename}})
{
@cases = map make_combinations($_, @{$comb}), @cases;
}
@@ -961,7 +980,7 @@ sub get_tags_from_file($$) {
push @$tags, get_tags_from_file($sourced_file, $suitedir);
push @$master_opts, @{$file_to_master_opts->{$sourced_file}};
push @$slave_opts, @{$file_to_slave_opts->{$sourced_file}};
- push @combinations, @{$file_combinations->{$sourced_file}};
+ push @combinations, @{$file_combinations{$sourced_file}};
last;
}
}
@@ -983,7 +1002,7 @@ sub get_tags_from_file($$) {
$file_to_tags->{$file}= $tags;
$file_to_master_opts->{$file}= $master_opts;
$file_to_slave_opts->{$file}= $slave_opts;
- $file_combinations->{$file}= [ uniq(@combinations) ];
+ $file_combinations{$file}= [ uniq(@combinations) ];
return @{$tags};
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e0fed8521d6..00d5d2142a6 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3715,6 +3715,7 @@ sub do_before_run_mysqltest($)
{
my $tinfo= shift;
my $resfile= $tinfo->{result_file};
+ return unless defined $resfile;
# Remove old files produced by mysqltest
die "unsupported result file name $resfile, stoping" unless
diff --git a/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff b/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff
new file mode 100644
index 00000000000..0a8ea2d8c67
--- /dev/null
+++ b/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff
@@ -0,0 +1,11 @@
+--- r/innodb_bug878769.result 2011-11-22 18:50:25.000000000 +0100
++++ r/innodb_bug878769.reject 2012-02-07 12:45:07.000000000 +0100
+@@ -39,7 +39,7 @@
+ GROUP BY 1,2;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 index col_int_key col_int_key 5 NULL 12 Using where; Using index; Using temporary; Using filesort
+-1 SIMPLE t1 ref col_int_key col_int_key 5 test.t2.col_int_key 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
++1 SIMPLE t1 ref col_int_key col_int_key 5 test.t2.col_int_key 1
+ SELECT t1.col_time_key, t1.col_varchar_key
+ FROM t2 STRAIGHT_JOIN t1 ON t1.col_int_key = t2.col_int_key
+ GROUP BY 1,2;
diff --git a/mysql-test/r/innodb_icp,innodb_plugin.rdiff b/mysql-test/r/innodb_icp,innodb_plugin.rdiff
new file mode 100644
index 00000000000..bf598d64cd5
--- /dev/null
+++ b/mysql-test/r/innodb_icp,innodb_plugin.rdiff
@@ -0,0 +1,85 @@
+--- r/innodb_icp.result 2012-01-09 16:13:21.000000000 +0100
++++ r/innodb_icp.reject 2012-02-07 12:45:59.000000000 +0100
+@@ -167,7 +167,7 @@
+ ORDER BY ts DESC
+ LIMIT 2;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using index condition
++1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
+
+ DROP TABLE t1;
+ #
+@@ -213,7 +213,7 @@
+ EXPLAIN
+ SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where
++1 SIMPLE t3 range c1 c1 12 NULL 2 Using where
+ SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
+ c1
+ EXPLAIN
+@@ -431,7 +431,7 @@
+ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
+-2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
++2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using where
+ 2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
+ SELECT * FROM t1
+ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
+@@ -452,7 +452,7 @@
+ INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
+ EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using index condition
++1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
+ SET SESSION optimizer_switch='index_condition_pushdown=off';
+ SELECT pk, c1 FROM t1 WHERE pk <> 3;
+ pk c1
+@@ -507,8 +507,8 @@
+ WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
+ (t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using where
+-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Using join buffer (flat, BNL join)
++1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where
++1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using join buffer (flat, BNL join)
+ SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
+ WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
+ (t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
+@@ -637,7 +637,7 @@
+ WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort
++1 SIMPLE t1 range b b 13 NULL 2 Using where; Using filesort
+ SELECT * FROM t1
+ WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+@@ -649,7 +649,7 @@
+ WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort
++1 SIMPLE t1 range b b 13 NULL 2 Using where; Using filesort
+ SELECT * FROM t1
+ WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+@@ -680,7 +680,7 @@
+ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+ HAVING t1.c != 5 ORDER BY t1.c;
+ id select_type table type possible_keys key key_len ref rows Extra
+-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Using filesort
++1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort
+ 1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where
+ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+ HAVING t1.c != 5 ORDER BY t1.c;
+@@ -793,7 +793,7 @@
+ 1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
+ 1 PRIMARY t2 ref g g 5 test.t.c 9 Using where
+ 2 DEPENDENT SUBQUERY t1 index PRIMARY d 3 NULL 64 Using where; Using index
+-2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index condition; Using where
++2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
+ SELECT COUNT(*) FROM t1 AS t, t2
+ WHERE c = g
+ AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
diff --git a/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff b/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff
new file mode 100644
index 00000000000..bfbb89400e0
--- /dev/null
+++ b/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff
@@ -0,0 +1,111 @@
+--- r/innodb_mrr_cpk.result 2011-10-21 23:35:26.000000000 +0200
++++ r/innodb_mrr_cpk.reject 2012-02-07 12:47:49.000000000 +0100
+@@ -27,13 +27,13 @@
+ explain select * from t1, t2 where t1.a=t2.a;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.a 1 Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.a 1
+ This output must be sorted by value of t1.a:
+ select * from t1, t2 where t1.a=t2.a;
+ a b filler a
+ a-1010=A b-1010=B filler a-1010=A
+-a-1020=A b-1020=B filler a-1020=A
+ a-1030=A b-1030=B filler a-1030=A
++a-1020=A b-1020=B filler a-1020=A
+ drop table t1, t2;
+ create table t1(
+ a char(8) character set utf8, b int, filler char(100),
+@@ -49,24 +49,24 @@
+ explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1
+ select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ a b filler a b
+ a-1010=A 1010 filler a-1010=A 1010
+-a-1020=A 1020 filler a-1020=A 1020
+ a-1030=A 1030 filler a-1030=A 1030
++a-1020=A 1020 filler a-1020=A 1020
+ insert into t2 values ('a-1030=A', 1030), ('a-1020=A', 1020);
+ explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where
+-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1
+ select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ a b filler a b
+ a-1010=A 1010 filler a-1010=A 1010
+-a-1020=A 1020 filler a-1020=A 1020
+-a-1020=A 1020 filler a-1020=A 1020
+ a-1030=A 1030 filler a-1030=A 1030
++a-1020=A 1020 filler a-1020=A 1020
+ a-1030=A 1030 filler a-1030=A 1030
++a-1020=A 1020 filler a-1020=A 1020
+ drop table t1, t2;
+ create table t1(
+ a varchar(8) character set utf8, b int, filler char(100),
+@@ -82,21 +82,21 @@
+ explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 30 test.t2.a,test.t2.b 1 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 eq_ref PRIMARY PRIMARY 30 test.t2.a,test.t2.b 1 Using where
+ select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ a b filler a b
+ a-1010=A 1010 filler a-1010=A 1010
+-a-1020=A 1020 filler a-1020=A 1020
+ a-1030=A 1030 filler a-1030=A 1030
++a-1020=A 1020 filler a-1020=A 1020
+ explain select * from t1, t2 where t1.a=t2.a;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 ref PRIMARY PRIMARY 26 test.t2.a 1 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 ref PRIMARY PRIMARY 26 test.t2.a 1 Using where
+ select * from t1, t2 where t1.a=t2.a;
+ a b filler a b
+ a-1010=A 1010 filler a-1010=A 1010
+-a-1020=A 1020 filler a-1020=A 1020
+ a-1030=A 1030 filler a-1030=A 1030
++a-1020=A 1020 filler a-1020=A 1020
+ drop table t1, t2;
+ create table t1 (a int, b int, c int, filler char(100), primary key(a,b,c));
+ insert into t1 select A.a, B.a, C.a, 'filler' from t0 A, t0 B, t0 C;
+@@ -111,15 +111,15 @@
+ explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1
+ select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ a b c filler a b
++11 33 124 filler 11 33
++11 33 125 filler 11 33
++11 22 1234 filler 11 22
+ 11 11 11 filler 11 11
+ 11 11 12 filler 11 11
+ 11 11 13 filler 11 11
+-11 22 1234 filler 11 22
+-11 33 124 filler 11 33
+-11 33 125 filler 11 33
+ set join_cache_level=0;
+ select * from t1, t2 where t1.a=t2.a and t1.b=t2.b;
+ a b c filler a b
+@@ -133,14 +133,14 @@
+ explain select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where
+ select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100;
+ a b c filler a b
+ set optimizer_switch='index_condition_pushdown=off';
+ explain select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+-1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered scan
++1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where
+ select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100;
+ a b c filler a b
+ set optimizer_switch='index_condition_pushdown=on';
diff --git a/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff b/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff
new file mode 100644
index 00000000000..528d3ac08ea
--- /dev/null
+++ b/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff
@@ -0,0 +1,20 @@
+--- r/subselect_sj2_jcl6.result 2012-01-11 18:05:14.000000000 +0100
++++ r/subselect_sj2_jcl6.reject 2012-02-07 12:52:32.000000000 +0100
+@@ -81,7 +81,7 @@
+ explain select * from t3 where b in (select a from t1);
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+-1 PRIMARY t3 ref b b 5 test.t1.a 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
++1 PRIMARY t3 ref b b 5 test.t1.a 1
+ 2 MATERIALIZED t1 ALL NULL NULL NULL NULL 3 Using where
+ select * from t3 where b in (select a from t1);
+ a b pk1 pk2 pk3
+@@ -107,7 +107,7 @@
+ explain select * from t3 where b in (select a from t0);
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 10
+-1 PRIMARY t3 ref b b 5 test.t0.a 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
++1 PRIMARY t3 ref b b 5 test.t0.a 1
+ 2 MATERIALIZED t0 ALL NULL NULL NULL NULL 10 Using where
+ select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
+ a b pk1 pk2
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index a6507ca8351..9bdd8658690 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -233,7 +233,7 @@ a+0 b+0
127 403
explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 2 NULL 27 Using where; Using index; Using filesort
+1 SIMPLE t1 range a a 2 NULL # Using where; Using index; Using filesort
select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
a+0 b+0
44 307
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
new file mode 100644
index 00000000000..18290e05bd4
--- /dev/null
+++ b/mysql-test/suite.pm
@@ -0,0 +1,16 @@
+package My::Suite::Main;
+
+@ISA = qw(My::Suite);
+
+sub skip_combinations {
+ my @combinations;
+
+ push @combinations, 'innodb_plugin' unless $ENV{HA_INNODB_SO};
+ push @combinations, 'xtradb_plugin' unless $ENV{HA_XTRADB_SO};
+ push @combinations, 'xtradb' unless $::mysqld_variables{'innodb'} eq "ON";
+
+ ( 'include/have_innodb.combinations' => [ @combinations ] )
+}
+
+bless { };
+
diff --git a/mysql-test/suite/federated/suite.pm b/mysql-test/suite/federated/suite.pm
index 06458b97adc..6b97fd6528e 100644
--- a/mysql-test/suite/federated/suite.pm
+++ b/mysql-test/suite/federated/suite.pm
@@ -2,18 +2,17 @@ package My::Suite::Federated;
@ISA = qw(My::Suite);
-############# initialization ######################
-my @combinations;
+sub skip_combinations {
+ my @combinations;
-push @combinations, 'old'
- if $ENV{HA_FEDERATED_SO} and not $::mysqld_variables{'federated'};
-push @combinations, 'X'
- if $ENV{HA_FEDERATEDX_SO} or $::mysqld_variables{'federated'};
+ push @combinations, 'old'
+ unless $ENV{HA_FEDERATED_SO} and not $::mysqld_variables{'federated'};
+ push @combinations, 'X'
+ unless $ENV{HA_FEDERATEDX_SO} or $::mysqld_variables{'federated'};
-return "Neither Federated nor FederatedX are available" unless @combinations;
+ ( 'combinations' => [ @combinations ] )
+}
-$ENV{FEDERATED_COMBINATIONS}=join ':', @combinations
- unless $ENV{FEDERATED_COMBINATIONS};
############# return an object ######################
bless { };
diff --git a/mysql-test/suite/funcs_1/r/is_engines_innodb,innodb_plugin.rdiff b/mysql-test/suite/funcs_1/r/is_engines_innodb,innodb_plugin.rdiff
new file mode 100644
index 00000000000..6dcdfb85e3c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines_innodb,innodb_plugin.rdiff
@@ -0,0 +1,11 @@
+--- suite/funcs_1/r/is_engines_innodb.result 2011-10-21 23:35:26.000000000 +0200
++++ suite/funcs_1/r/is_engines_innodb.reject 2012-02-07 12:44:19.000000000 +0100
+@@ -2,7 +2,7 @@
+ WHERE ENGINE = 'InnoDB';
+ ENGINE InnoDB
+ SUPPORT YES
+-COMMENT Percona-XtraDB, Supports transactions, row-level locking, and foreign keys
++COMMENT Supports transactions, row-level locking, and foreign keys
+ TRANSACTIONS YES
+ XA YES
+ SAVEPOINTS YES
diff --git a/mysql-test/suite/innodb/suite.pm b/mysql-test/suite/innodb/suite.pm
deleted file mode 100644
index 8eccaeca019..00000000000
--- a/mysql-test/suite/innodb/suite.pm
+++ /dev/null
@@ -1,19 +0,0 @@
-package My::Suite::InnoDB;
-
-@ISA = qw(My::Suite);
-
-############# initialization ######################
-my @combinations;
-
-push @combinations, 'innodb_plugin' if $ENV{HA_INNODB_SO};
-push @combinations, 'xtradb_plugin' if $ENV{HA_XTRADB_SO} and not $::opt_embedded_server;
-push @combinations, 'xtradb' if $::mysqld_variables{'innodb'} eq "ON";
-
-return "Neither innodb_plugin nor xtradb are available" unless @combinations;
-
-$ENV{INNODB_COMBINATIONS}=join ':', @combinations
- unless $ENV{INNODB_COMBINATIONS};
-
-############# return an object ######################
-bless { };
-
diff --git a/mysql-test/suite/innodb/t/binlog_consistent.test b/mysql-test/suite/innodb/t/binlog_consistent.test
index 7502980d72a..f4babb8bad7 100644
--- a/mysql-test/suite/innodb/t/binlog_consistent.test
+++ b/mysql-test/suite/innodb/t/binlog_consistent.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed_or_statement.inc
diff --git a/mysql-test/suite/innodb/t/group_commit.test b/mysql-test/suite/innodb/t/group_commit.test
index f857658d643..07aac2a619e 100644
--- a/mysql-test/suite/innodb/t/group_commit.test
+++ b/mysql-test/suite/innodb/t/group_commit.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_log_bin.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_binlog_pos.test b/mysql-test/suite/innodb/t/group_commit_binlog_pos.test
index 5e70db68a97..72798a68a1e 100644
--- a/mysql-test/suite/innodb/t/group_commit_binlog_pos.test
+++ b/mysql-test/suite/innodb/t/group_commit_binlog_pos.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed_or_statement.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread.test
index dba9c0589cf..e9a234577e2 100644
--- a/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread.test
+++ b/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed_or_statement.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_crash.test b/mysql-test/suite/innodb/t/group_commit_crash.test
index 10b0e102bea..3502ab41180 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Testing group commit by crashing a few times.
# Test adapted from the Facebook patch: lp:mysqlatfacebook
--source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
index 10b0e102bea..3502ab41180 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Testing group commit by crashing a few times.
# Test adapted from the Facebook patch: lp:mysqlatfacebook
--source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test
index 1f821174326..7bee6b8b177 100644
--- a/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test
+++ b/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_log_bin.inc
diff --git a/mysql-test/suite/innodb/t/innodb-analyze.test b/mysql-test/suite/innodb/t/innodb-analyze.test
index c2e4410544a..0fec9968c1f 100644
--- a/mysql-test/suite/innodb/t/innodb-analyze.test
+++ b/mysql-test/suite/innodb/t/innodb-analyze.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Test that mysqld does not crash when running ANALYZE TABLE with
# different values of the parameter innodb_stats_sample_pages.
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-18274.test b/mysql-test/suite/innodb/t/innodb-autoinc-18274.test
index 9d9ea294cb4..006982ce0af 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-18274.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-18274.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
index 7c9b7017464..07e9ca30fd6 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test
index a0637620dea..28141f812b2 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
##
# Bug #56228: dropping tables from within an active statement crashes server
#
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
index 2cd1449ec0f..8fc34e94076 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 87ca1425630..4b3c3b2e56d 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-consistent.test b/mysql-test/suite/innodb/t/innodb-consistent.test
index 561f31f5783..25015de018a 100644
--- a/mysql-test/suite/innodb/t/innodb-consistent.test
+++ b/mysql-test/suite/innodb/t/innodb-consistent.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
-- source include/not_embedded.inc
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb/t/innodb-create-options.test
index 83155897349..3215002a37c 100644
--- a/mysql-test/suite/innodb/t/innodb-create-options.test
+++ b/mysql-test/suite/innodb/t/innodb-create-options.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE
# Related bugs;
# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 2402c74fe53..cb4527d6cb2 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -1,3 +1,4 @@
+-- source include/have_innodb.inc
let $MYSQLD_DATADIR= `select @@datadir`;
diff --git a/mysql-test/suite/innodb/t/innodb-index_ucs2.test b/mysql-test/suite/innodb/t/innodb-index_ucs2.test
index 84f2444ff4d..fff9a4da1a8 100644
--- a/mysql-test/suite/innodb/t/innodb-index_ucs2.test
+++ b/mysql-test/suite/innodb/t/innodb-index_ucs2.test
@@ -1,3 +1,4 @@
+-- source include/have_innodb.inc
-- source include/have_ucs2.inc
-- let charset = ucs2
diff --git a/mysql-test/suite/innodb/t/innodb-lock.test b/mysql-test/suite/innodb/t/innodb-lock.test
index 817b18ee6df..2c2516557ef 100644
--- a/mysql-test/suite/innodb/t/innodb-lock.test
+++ b/mysql-test/suite/innodb/t/innodb-lock.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not supported by XtraDB 1.1.8-20.1 or earlier
diff --git a/mysql-test/suite/innodb/t/innodb-replace.test b/mysql-test/suite/innodb/t/innodb-replace.test
index 20ca8e98ce2..8c3aacde5e8 100644
--- a/mysql-test/suite/innodb/t/innodb-replace.test
+++ b/mysql-test/suite/innodb/t/innodb-replace.test
@@ -1,3 +1,4 @@
+-- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-semi-consistent.test b/mysql-test/suite/innodb/t/innodb-semi-consistent.test
index 6036aa3ed9c..2551db99cf3 100644
--- a/mysql-test/suite/innodb/t/innodb-semi-consistent.test
+++ b/mysql-test/suite/innodb/t/innodb-semi-consistent.test
@@ -1,4 +1,5 @@
-- source include/not_embedded.inc
+-- source include/have_innodb.inc
--disable_warnings
drop table if exists t1,t2;
diff --git a/mysql-test/suite/innodb/t/innodb-timeout.test b/mysql-test/suite/innodb/t/innodb-timeout.test
index 07d03093b63..0beeea8f39e 100644
--- a/mysql-test/suite/innodb/t/innodb-timeout.test
+++ b/mysql-test/suite/innodb/t/innodb-timeout.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
let $initial_timeout=`select @@innodb_lock_wait_timeout`;
set global innodb_lock_wait_timeout=42;
diff --git a/mysql-test/suite/innodb/t/innodb-truncate.test b/mysql-test/suite/innodb/t/innodb-truncate.test
index b01ff545e1a..ae25aabd323 100644
--- a/mysql-test/suite/innodb/t/innodb-truncate.test
+++ b/mysql-test/suite/innodb/t/innodb-truncate.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--echo #
--echo # TRUNCATE TABLE
--echo #
diff --git a/mysql-test/suite/innodb/t/innodb-ucs2.test b/mysql-test/suite/innodb/t/innodb-ucs2.test
index 1b59d4aa32e..010d27ab851 100644
--- a/mysql-test/suite/innodb/t/innodb-ucs2.test
+++ b/mysql-test/suite/innodb/t/innodb-ucs2.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
-- source include/have_ucs2.inc
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test
index 6561feffdd4..39a094d0359 100644
--- a/mysql-test/suite/innodb/t/innodb-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-zip.test
@@ -1,3 +1,4 @@
+-- source include/have_innodb.inc
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
index 7d2e94c296d..07f096b2c23 100644
--- a/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
+++ b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This test runs with old-style locking, as:
# --innodb-autoinc-lock-mode=0
diff --git a/mysql-test/suite/innodb/t/innodb_bug21704.test b/mysql-test/suite/innodb/t/innodb_bug21704.test
index a1dbc8eb734..67d76587819 100644
--- a/mysql-test/suite/innodb/t/innodb_bug21704.test
+++ b/mysql-test/suite/innodb/t/innodb_bug21704.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_bug30423.test b/mysql-test/suite/innodb/t/innodb_bug30423.test
index 9e4156f1cf8..bbb6f1155ff 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30423.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30423.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Test for Bug #30423, InnoDBs treatment of NULL in index stats causes
# bad "rows examined" estimates.
# Implemented InnoDB system variable "innodb_stats_method" with
diff --git a/mysql-test/suite/innodb/t/innodb_bug30919.test b/mysql-test/suite/innodb/t/innodb_bug30919.test
index 84435ad3312..56b2c7bc03d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30919.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30919.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_partition.inc
--vertical_results
let $engine_type= 'innodb';
diff --git a/mysql-test/suite/innodb/t/innodb_bug34053.test b/mysql-test/suite/innodb/t/innodb_bug34053.test
index 2025a029613..b935e45c06d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34053.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34053.test
@@ -3,6 +3,7 @@
#
-- source include/not_embedded.inc
+-- source include/have_innodb.inc
SET storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test
index 09ab23eb4f4..3f496741c6a 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34300.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34300.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
# http://bugs.mysql.com/34300
diff --git a/mysql-test/suite/innodb/t/innodb_bug35220.test b/mysql-test/suite/innodb/t/innodb_bug35220.test
index 4388cfd2a85..29c432fe987 100644
--- a/mysql-test/suite/innodb/t/innodb_bug35220.test
+++ b/mysql-test/suite/innodb/t/innodb_bug35220.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#35220 ALTER TABLE too picky on reserved word "foreign"
# http://bugs.mysql.com/35220
diff --git a/mysql-test/suite/innodb/t/innodb_bug36169.test b/mysql-test/suite/innodb/t/innodb_bug36169.test
index 0695413266b..6426bd683ae 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb/t/innodb_bug36169.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#36169 create innodb compressed table with too large row size crashed
# http://bugs.mysql.com/36169
diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb/t/innodb_bug36172.test
index 30be4873df0..015f461e532 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36172.test
+++ b/mysql-test/suite/innodb/t/innodb_bug36172.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Test case for bug 36172
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug38231.test b/mysql-test/suite/innodb/t/innodb_bug38231.test
index db338324da3..ba4e1c62e06 100644
--- a/mysql-test/suite/innodb/t/innodb_bug38231.test
+++ b/mysql-test/suite/innodb/t/innodb_bug38231.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
# http://bugs.mysql.com/38231
diff --git a/mysql-test/suite/innodb/t/innodb_bug39438.test b/mysql-test/suite/innodb/t/innodb_bug39438.test
index 6f57ef17ab3..3a838da8419 100644
--- a/mysql-test/suite/innodb/t/innodb_bug39438.test
+++ b/mysql-test/suite/innodb/t/innodb_bug39438.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
# http://bugs.mysql.com/39438
diff --git a/mysql-test/suite/innodb/t/innodb_bug40360.test b/mysql-test/suite/innodb/t/innodb_bug40360.test
index a6b67b03c6f..f5187d55092 100644
--- a/mysql-test/suite/innodb/t/innodb_bug40360.test
+++ b/mysql-test/suite/innodb/t/innodb_bug40360.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Make sure http://bugs.mysql.com/40360 remains fixed.
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug40565.test b/mysql-test/suite/innodb/t/innodb_bug40565.test
index 4d4ee6811d7..a5d1434626c 100644
--- a/mysql-test/suite/innodb/t/innodb_bug40565.test
+++ b/mysql-test/suite/innodb/t/innodb_bug40565.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug #40565 Update Query Results in "1 Row Affected" But Should Be "Zero Rows"
create table bug40565(value decimal(4,2)) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug41904.test b/mysql-test/suite/innodb/t/innodb_bug41904.test
index 0aac1c840c3..4b45128df2a 100644
--- a/mysql-test/suite/innodb/t/innodb_bug41904.test
+++ b/mysql-test/suite/innodb/t/innodb_bug41904.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Make sure http://bugs.mysql.com/41904 remains fixed.
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
index 96c28db8ede..3ee3f1e6a8b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#42101 Race condition in innodb_commit_concurrency
# http://bugs.mysql.com/42101
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101.test b/mysql-test/suite/innodb/t/innodb_bug42101.test
index 2603ff1e682..374d3e6b5f5 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42101.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42101.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#42101 Race condition in innodb_commit_concurrency
# http://bugs.mysql.com/42101
diff --git a/mysql-test/suite/innodb/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test
index 43e9ada96db..788437b0394 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42419.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42419.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Testcase for InnoDB
# Bug#42419 Server crash with "Pure virtual method called" on two concurrent connections
diff --git a/mysql-test/suite/innodb/t/innodb_bug44032.test b/mysql-test/suite/innodb/t/innodb_bug44032.test
index 74c4b1dcb04..0016749619d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44032.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44032.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug44032 no update-in-place of UTF-8 columns in ROW_FORMAT=REDUNDANT
# (btr_cur_update_in_place not invoked when updating from/to NULL;
# the update is performed by delete and insert instead)
diff --git a/mysql-test/suite/innodb/t/innodb_bug44369.test b/mysql-test/suite/innodb/t/innodb_bug44369.test
index 2d9304567f8..caa4eed3c37 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44369.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44369.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 44369. We should
# block table creation with columns match
# some innodb internal reserved key words,
diff --git a/mysql-test/suite/innodb/t/innodb_bug44571.test b/mysql-test/suite/innodb/t/innodb_bug44571.test
index d0868659910..e27ed0b9bf8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44571.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44571.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#44571 InnoDB Plugin crashes on ADD INDEX
# http://bugs.mysql.com/44571
diff --git a/mysql-test/suite/innodb/t/innodb_bug45357.test b/mysql-test/suite/innodb/t/innodb_bug45357.test
index 524ee85c6ba..8294bfe6f34 100644
--- a/mysql-test/suite/innodb/t/innodb_bug45357.test
+++ b/mysql-test/suite/innodb/t/innodb_bug45357.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
set session transaction isolation level read committed;
diff --git a/mysql-test/suite/innodb/t/innodb_bug46000.test b/mysql-test/suite/innodb/t/innodb_bug46000.test
index 95b9ff4dcc9..3dcfa85a135 100644
--- a/mysql-test/suite/innodb/t/innodb_bug46000.test
+++ b/mysql-test/suite/innodb/t/innodb_bug46000.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 46000. We shall
# block any index creation with the name of
# "GEN_CLUST_INDEX", which is the reserved
diff --git a/mysql-test/suite/innodb/t/innodb_bug46676.test b/mysql-test/suite/innodb/t/innodb_bug46676.test
index 27bd1dcd6dc..fdea70c6855 100644
--- a/mysql-test/suite/innodb/t/innodb_bug46676.test
+++ b/mysql-test/suite/innodb/t/innodb_bug46676.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 46676: mysqld got exception 0xc0000005
# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
diff --git a/mysql-test/suite/innodb/t/innodb_bug47167.test b/mysql-test/suite/innodb/t/innodb_bug47167.test
index dee2ac26f8b..a7e1e607cd8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47167.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47167.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the unit test for bug #47167.
# It tests setting the global variable "innodb_file_format_max" (
# originally "innodb_file_format_check") with a user-Defined Variable.
diff --git a/mysql-test/suite/innodb/t/innodb_bug47621.test b/mysql-test/suite/innodb/t/innodb_bug47621.test
index 80b42bc738b..64a6ff761ea 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47621.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47621.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug #47621, column rename operation should
# not result in column definition inconsistency between MySQL and
# InnoDB
diff --git a/mysql-test/suite/innodb/t/innodb_bug47622.test b/mysql-test/suite/innodb/t/innodb_bug47622.test
index 45cf4d5ec4d..2ebf9a627f1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47622.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47622.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 47622. There could be index
# metadata sequence mismatch between MySQL and Innodb
# after creating index through FIC interfaces.
diff --git a/mysql-test/suite/innodb/t/innodb_bug47777.test b/mysql-test/suite/innodb/t/innodb_bug47777.test
index 52d975901de..d00509c3814 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47777.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47777.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 47777. GEOMETRY
# data is treated as BLOB data in innodb.
# Consequently, its key value generation/storing
diff --git a/mysql-test/suite/innodb/t/innodb_bug48024.test b/mysql-test/suite/innodb/t/innodb_bug48024.test
index aa7dd8dbf10..db828aa1cda 100644
--- a/mysql-test/suite/innodb/t/innodb_bug48024.test
+++ b/mysql-test/suite/innodb/t/innodb_bug48024.test
@@ -1,5 +1,6 @@
# Bug #48024 Innodb doesn't work with multi-statements
+--source include/have_innodb.inc
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug49164.test b/mysql-test/suite/innodb/t/innodb_bug49164.test
index 96d59da02f2..159475ba10f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug49164.test
+++ b/mysql-test/suite/innodb/t/innodb_bug49164.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK
# a duplicate of
diff --git a/mysql-test/suite/innodb/t/innodb_bug51378.test b/mysql-test/suite/innodb/t/innodb_bug51378.test
index c171bae04ae..e11c3c0053e 100644
--- a/mysql-test/suite/innodb/t/innodb_bug51378.test
+++ b/mysql-test/suite/innodb/t/innodb_bug51378.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug 51378. Unique index created
# through "create index" and "alter table add unique index"
# interfaces should not be treated as primary index if indexed
diff --git a/mysql-test/suite/innodb/t/innodb_bug51920.test b/mysql-test/suite/innodb/t/innodb_bug51920.test
index 41c52bbd89b..0d4715712b0 100644
--- a/mysql-test/suite/innodb/t/innodb_bug51920.test
+++ b/mysql-test/suite/innodb/t/innodb_bug51920.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug52199.test b/mysql-test/suite/innodb/t/innodb_bug52199.test
index b95cdef3fdd..d78a53be4c3 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52199.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52199.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
let collation=utf32_bin;
--source include/have_collation.inc
diff --git a/mysql-test/suite/innodb/t/innodb_bug52663.test b/mysql-test/suite/innodb/t/innodb_bug52663.test
index e4e87ee33d8..fcf97531e00 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52663.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52663.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
set session transaction isolation level read committed;
diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb/t/innodb_bug52745.test
index 252de1e2794..58bcc264677 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52745.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53046.test b/mysql-test/suite/innodb/t/innodb_bug53046.test
index d531a9d2284..dddff8a235f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53046.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53046.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# http://bugs.mysql.com/53046
# dict_update_statistics_low can still be run concurrently on same table
diff --git a/mysql-test/suite/innodb/t/innodb_bug53290.test b/mysql-test/suite/innodb/t/innodb_bug53290.test
index 90e23127d64..ea15212fa39 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53290.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53290.test
@@ -1,3 +1,4 @@
+-- source include/have_innodb.inc
create table bug53290 (x bigint) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb/t/innodb_bug53591.test
index 3261779a825..9a1c2afbccb 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53591.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53592.test b/mysql-test/suite/innodb/t/innodb_bug53592.test
index 7eefe6d7631..2f901d7eb99 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53592.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53592.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Testcase for Bug #53592 - "crash replacing duplicates into
# table after fast alter table added unique key". The fix is to make
# sure index number lookup should go through "index translation table".
diff --git a/mysql-test/suite/innodb/t/innodb_bug53674.test b/mysql-test/suite/innodb/t/innodb_bug53674.test
index c2d11b953e6..f89c3d473e9 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53674.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53674.test
@@ -1,4 +1,5 @@
-- source include/have_log_bin.inc
+-- source include/have_innodb.inc
create table bug53674(a int)engine=innodb;
insert into bug53674 values (1),(2);
diff --git a/mysql-test/suite/innodb/t/innodb_bug53756.test b/mysql-test/suite/innodb/t/innodb_bug53756.test
index ba66c9d8eb3..2f778d45f61 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53756.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53756.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test case for bug #53756. Alter table operation could
# leave a deleted record for the temp table (later renamed to the altered
# table) in the SYS_TABLES secondary index, we should ignore this row and
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
index 4b6341d2412..013a7ff1e93 100644
--- a/mysql-test/suite/innodb/t/innodb_bug54044.test
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
# during create table, so it will not trigger assertion failure.
diff --git a/mysql-test/suite/innodb/t/innodb_bug56143.test b/mysql-test/suite/innodb/t/innodb_bug56143.test
index ef75ab8281f..fa04b2e4262 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56143.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56143.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#56143 too many foreign keys causes output of show create table to become invalid
# http://bugs.mysql.com/56143
diff --git a/mysql-test/suite/innodb/t/innodb_bug56680.test b/mysql-test/suite/innodb/t/innodb_bug56680.test
index 1fcf55add60..f592bd16942 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56680.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56680.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #56680 InnoDB may return wrong results from a case-insensitive index
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug56716.test b/mysql-test/suite/innodb/t/innodb_bug56716.test
index e297b627dcb..47fdac3e150 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56716.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56716.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #56716 InnoDB locks a record gap without locking the table
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug56947.test b/mysql-test/suite/innodb/t/innodb_bug56947.test
index b1aca4efd4f..b6feb239314 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56947.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56947.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #56947 valgrind reports a memory leak in innodb-plugin.innodb-index
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug57252.test b/mysql-test/suite/innodb/t/innodb_bug57252.test
index 996533feabe..5a4ca1ab6d8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug57252.test
+++ b/mysql-test/suite/innodb/t/innodb_bug57252.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
# http://bugs.mysql.com/57252
diff --git a/mysql-test/suite/innodb/t/innodb_bug57255.test b/mysql-test/suite/innodb/t/innodb_bug57255.test
index 27e0a1af1a0..cf7982a6ddf 100644
--- a/mysql-test/suite/innodb/t/innodb_bug57255.test
+++ b/mysql-test/suite/innodb/t/innodb_bug57255.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Test Bug #57255. Cascade deletes that affect different rows should not
# result in DB_FOREIGN_EXCEED_MAX_CASCADE error
diff --git a/mysql-test/suite/innodb/t/innodb_bug57904.test b/mysql-test/suite/innodb/t/innodb_bug57904.test
index 0669a2e53a5..48dc5254b26 100755
--- a/mysql-test/suite/innodb/t/innodb_bug57904.test
+++ b/mysql-test/suite/innodb/t/innodb_bug57904.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #57904 Missing constraint from information schema REFERENTIAL_CONSTRAINTS table
#
diff --git a/mysql-test/suite/innodb/t/innodb_bug59410.test b/mysql-test/suite/innodb/t/innodb_bug59410.test
index 89d3f1a0637..30bb0642679 100644
--- a/mysql-test/suite/innodb/t/innodb_bug59410.test
+++ b/mysql-test/suite/innodb/t/innodb_bug59410.test
@@ -1,6 +1,8 @@
#
# Bug#59410 read uncommitted: unlock row could not find a 3 mode lock on the record
#
+-- source include/have_innodb.inc
+
# only interested that the following do not produce something like
# InnoDB: Error: unlock row could not find a 2 mode lock on the record
# in the error log
diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test
index 94b9ed8f9ed..a8d35cd1029 100644
--- a/mysql-test/suite/innodb/t/innodb_bug59641.test
+++ b/mysql-test/suite/innodb/t/innodb_bug59641.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug #59641 Prepared XA transaction causes shutdown hang after a crash
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049.test b/mysql-test/suite/innodb/t/innodb_bug60049.test
index 10a6f3032ba..19c7fad484d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60049.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug #60049 Verify that purge leaves no garbage in unique secondary indexes
# This test requires a fresh server start-up and a slow shutdown.
# This was a suspected bug (not a bug).
diff --git a/mysql-test/suite/innodb/t/innodb_bug60196.test b/mysql-test/suite/innodb/t/innodb_bug60196.test
index 6e2974fd4f8..fcef3196845 100755
--- a/mysql-test/suite/innodb/t/innodb_bug60196.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60196.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Bug#60196 - Setting lowercase_table_names to 2 on Windows causing
# Foreign Key problems after an engine is restarted.
diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
index 827bb4bcc74..c9a0237fa5f 100644
--- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
+++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not supported by XtraDB 1.1.8-20.1 or earlier
diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test
index f3b135f39bd..e6c442f80dc 100644
--- a/mysql-test/suite/innodb/t/innodb_file_format.test
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source suite/innodb/include/restart_and_reinit.inc
let $innodb_file_format_orig=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index dec0c8bf725..1adb14ea482 100644
--- a/mysql-test/suite/innodb/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
SET storage_engine=innodb;
--source include/gis_generic.inc
--source include/gis_keys.inc
diff --git a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
index 2ae0237488c..6873c2a404c 100644
--- a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
# Testcase for worklog #5743: Lift the limit of index key prefixes
let $innodb_file_format_orig=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/innodb/t/innodb_information_schema.test b/mysql-test/suite/innodb/t/innodb_information_schema.test
index 05fb67edf75..205344a1cd7 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema.test
@@ -3,6 +3,7 @@
# INFORMATION_SCHEMA.innodb_locks.lock_data
#
+-- source include/have_innodb.inc
-- disable_query_log
-- disable_result_log
diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
index 5a0aaa86d4c..f6f65391b82 100644
--- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--echo #
--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
diff --git a/mysql-test/suite/innodb/t/innodb_multi_update.test b/mysql-test/suite/innodb/t/innodb_multi_update.test
index e15f7470960..73ca0ba51dd 100644
--- a/mysql-test/suite/innodb/t/innodb_multi_update.test
+++ b/mysql-test/suite/innodb/t/innodb_multi_update.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Test multi update with different join methods
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 378df7fdcd8..3ae5be3aa30 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -7,6 +7,7 @@
# Slow test, don't run during staging part
-- source include/not_staging.inc
+-- source include/have_innodb.inc
-- source include/have_query_cache.inc
let $engine_type= InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_mysql_rbk.test b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
index e565bff16de..85a9769732f 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
diff --git a/mysql-test/suite/innodb/t/innodb_notembedded.test b/mysql-test/suite/innodb/t/innodb_notembedded.test
index 1caccdbc32b..79f5606ed6b 100644
--- a/mysql-test/suite/innodb/t/innodb_notembedded.test
+++ b/mysql-test/suite/innodb/t/innodb_notembedded.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
-- source include/not_embedded.inc
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
index c702b59e81f..ecd34d00c4d 100644
--- a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
+++ b/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
######## suite/innodb/t/innodb_prefix_index_liftedlimit.test ##########
# #
# Testcase for worklog WL#5743: Lift the limit of index key prefixes #
diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
index 1f54a9b253d..21a5753e909 100644
--- a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
+++ b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
######## suite/innodb/t/innodb_prefix_iindex_restart_server.test #####
# #
# Testcase for worklog WL#5743: Lift the limit of index key prefixes #
diff --git a/mysql-test/suite/innodb/t/innodb_trx_weight.test b/mysql-test/suite/innodb/t/innodb_trx_weight.test
index b2583ff3a8a..b72eaad345f 100644
--- a/mysql-test/suite/innodb/t/innodb_trx_weight.test
+++ b/mysql-test/suite/innodb/t/innodb_trx_weight.test
@@ -6,6 +6,7 @@
# be heavier than ones that had not.
#
+-- source include/have_innodb.inc
SET storage_engine=InnoDB;
diff --git a/mysql-test/suite/percona/innodb_fix_misc_bug51325.test b/mysql-test/suite/percona/innodb_fix_misc_bug51325.test
index 78d6e60046a..54fa3a80179 100644
--- a/mysql-test/suite/percona/innodb_fix_misc_bug51325.test
+++ b/mysql-test/suite/percona/innodb_fix_misc_bug51325.test
@@ -1,5 +1,5 @@
# Test for 'innodb_lazy_drop_table' variable
---source include/have_innodb.inc
+--source include/have_xtradb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/percona/percona_innodb_fake_changes.test b/mysql-test/suite/percona/percona_innodb_fake_changes.test
index fd231ae096f..5fa3ecc7b63 100644
--- a/mysql-test/suite/percona/percona_innodb_fake_changes.test
+++ b/mysql-test/suite/percona/percona_innodb_fake_changes.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/percona/percona_innodb_fake_changes_locks.test b/mysql-test/suite/percona/percona_innodb_fake_changes_locks.test
index e298405cd43..ce15fc0bf43 100644
--- a/mysql-test/suite/percona/percona_innodb_fake_changes_locks.test
+++ b/mysql-test/suite/percona/percona_innodb_fake_changes_locks.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
index 839399dea63..26ebb29ae8d 100644
--- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
@@ -1,7 +1,7 @@
-source include/master-slave.inc;
-- source include/have_innodb.inc
-- source include/not_embedded.inc
-- source include/have_binlog_format_mixed_or_statement.inc
+source include/master-slave.inc;
let $VERSION=`select version()`;
diff --git a/mysql-test/suite/rpl/t/rpl_ddl.test b/mysql-test/suite/rpl/t/rpl_ddl.test
index 83a530131a6..f9a353f87ac 100644
--- a/mysql-test/suite/rpl/t/rpl_ddl.test
+++ b/mysql-test/suite/rpl/t/rpl_ddl.test
@@ -23,8 +23,8 @@
# abort of the test case etc..
#
--source include/not_ndb_default.inc
---source include/master-slave.inc
--source include/have_innodb.inc
+--source include/master-slave.inc
let $engine_type= InnoDB;
let $temp_engine_type= MEMORY;
let $show_binlog = 0;
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
index c2cb4cb47bb..18076cfef7f 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
@@ -3,6 +3,7 @@
#
--source include/not_embedded.inc
--source include/have_innodb.inc
+--source suite/innodb/include/restart_and_reinit.inc
SET @start_global_value = @@global.innodb_file_format_max;
SELECT @start_global_value;
diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test
index bab46e00136..ca6ada7fc6f 100644
--- a/mysql-test/t/index_merge_innodb.test
+++ b/mysql-test/t/index_merge_innodb.test
@@ -12,7 +12,7 @@
# Slow test, don't run during staging part
--source include/not_staging.inc
---source include/have_innodb.inc
+--source include/have_xtradb.inc
let $engine_type= InnoDB;
# InnoDB does not support Merge tables (affects include/index_merge1.inc)
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 2e8b1420db8..b0f8ddd375f 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -8,8 +8,8 @@
# on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc
-# Check that InnoDB/XtraDB was compiled in as result depends on it
--- source include/have_innodb.inc
+# Check that XtraDB is enabled as result depends on it
+-- source include/have_xtradb.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test
index 2f85813d1ef..854af85f3fb 100644
--- a/mysql-test/t/query_cache_debug.test
+++ b/mysql-test/t/query_cache_debug.test
@@ -1,6 +1,7 @@
--source include/not_embedded.inc
--source include/have_query_cache.inc
--source include/have_debug_sync.inc
+--source include/long_test.inc
#
# Bug #30887 Server crashes on SET GLOBAL query_cache_size=0
diff --git a/mysql-test/t/rowid_order_innodb.test b/mysql-test/t/rowid_order_innodb.test
index 152eb28d388..1053b8bd7c2 100644
--- a/mysql-test/t/rowid_order_innodb.test
+++ b/mysql-test/t/rowid_order_innodb.test
@@ -8,7 +8,7 @@
# main code t/rowid_order_innodb.test -> include/rowid_order.inc
#
---source include/have_innodb.inc
+--source include/have_xtradb.inc
let $engine_type= InnoDB;
--source include/rowid_order.inc
diff --git a/mysql-test/t/type_bit_innodb.test b/mysql-test/t/type_bit_innodb.test
index dc5947e25e1..7ba90bf08fa 100644
--- a/mysql-test/t/type_bit_innodb.test
+++ b/mysql-test/t/type_bit_innodb.test
@@ -68,6 +68,7 @@ explain select b+0 from t1;
select b+0 from t1;
explain select a+0, b+0 from t1;
select a+0, b+0 from t1;
+--replace_column 9 #
explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index c6754660b84..7d89979fd1f 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -65,7 +65,7 @@ innobase_col_to_mysql(
*--ptr = *data++;
}
- if (!(field->flags & UNSIGNED_FLAG)) {
+ if (!(col->prtype & DATA_UNSIGNED)) {
((byte*) dest)[len - 1] ^= 0x80;
}