#At file:///home/msvensson/mysql/5.5-mtr/ based on revid:bjorn.munch@stripped
3155 Magnus Blåudd 2011-01-19
Cherry pick fix fo detecting MySQL CLuster in mtr.pl
modified:
mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2011-01-18 10:21:37 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-01-19 14:38:52 +0000
@@ -108,6 +108,7 @@ require "lib/mtr_misc.pl";
$SIG{INT}= sub { mtr_error("Got ^C signal"); };
our $mysql_version_id;
+my $mysql_version_extra;
our $glob_mysql_test_dir;
our $basedir;
our $bindir;
@@ -308,6 +309,13 @@ my $opt_max_test_fail= env_or_val(MTR_MA
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
+## MCP temp fixes to reduce footprint of large number of failing tests
+$opt_max_save_core = 1; # Don't save many cores
+$opt_max_save_datadir = 1; # Dont save many datadirs
+$opt_max_test_fail = 0; # Allow many tests to fail
+$opt_retry = 1; # Don't retry failed tests
+## MCP temp fixes end
+
select(STDOUT);
$| = 1; # Automatically flush STDOUT
@@ -1667,12 +1675,13 @@ sub collect_mysqld_features {
# Look for version
my $exe_name= basename($exe_mysqld);
mtr_verbose("exe_name: $exe_name");
- if ( $line =~ /^\S*$exe_name\s\sVer\s([0-9]*)\.([0-9]*)\.([0-9]*)/ )
+ if ( $line =~ /^\S*$exe_name\s\sVer\s([0-9]*)\.([0-9]*)\.([0-9]*)([^\s]*)/ )
{
#print "Major: $1 Minor: $2 Build: $3\n";
$mysql_version_id= $1*10000 + $2*100 + $3;
#print "mysql_version_id: $mysql_version_id\n";
mtr_report("MySQL Version $1.$2.$3");
+ $mysql_version_extra= $4;
}
}
else
@@ -1757,12 +1766,13 @@ sub collect_mysqld_features_from_running
# Parse version
my $version_str= $mysqld_variables{'version'};
- if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ )
+ if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)([^\s]*)/ )
{
#print "Major: $1 Minor: $2 Build: $3\n";
$mysql_version_id= $1*10000 + $2*100 + $3;
#print "mysql_version_id: $mysql_version_id\n";
mtr_report("MySQL Version $1.$2.$3");
+ $mysql_version_extra= $4;
}
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
}
@@ -2158,6 +2168,38 @@ sub environment_setup {
["storage/ndb/src/mgmclient", "bin"],
"ndb_mgm");
+ $ENV{'NDB_WAITER'}= $exe_ndb_waiter;
+
+ $ENV{'NDB_RESTORE'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_restore");
+
+ $ENV{'NDB_CONFIG'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_config");
+
+ $ENV{'NDB_SELECT_ALL'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_select_all");
+
+ $ENV{'NDB_DROP_TABLE'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_drop_table");
+
+ $ENV{'NDB_DESC'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_desc");
+
+ $ENV{'NDB_SHOW_TABLES'}=
+ my_find_bin($bindir,
+ ["storage/ndb/tools", "bin"],
+ "ndb_show_tables");
+
$ENV{'NDB_TOOLS_DIR'}=
my_find_dir($bindir,
["storage/ndb/tools", "bin"]);
@@ -2538,6 +2580,16 @@ sub vs_config_dirs ($$) {
sub check_ndbcluster_support ($) {
my $mysqld_variables= shift;
+ # Check if this is MySQL Cluster, ie. mysql version string ends
+ # with -ndb-Y.Y.Y[-status]
+ if ( defined $mysql_version_extra && $mysql_version_extra =~ /^-ndb-/ )
+ {
+ mtr_report(" - MySQL Cluster");
+ # Enable ndb engine and add more test suites
+ $opt_include_ndbcluster = 1;
+ $DEFAULT_SUITES.=",ndb";
+ }
+
if ($opt_include_ndbcluster)
{
$opt_skip_ndbcluster= 0;
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110119143852-y7qpanrrcajjmawy.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-mtr branch (magnus.blaudd:3155) | Magnus Blåudd | 19 Jan |