List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:January 19 2011 2:37pm
Subject:bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3135)
View as plain text  
#At file:///home/msvensson/mysql/5.5-telco-7.0/ based on revid:magnus.blaudd@strippedcc6dp

 3135 Magnus Blåudd	2011-01-19
      mtr.pl fix for ndb
       - Detect from the mysqld version string if this is MySQL Cluster
        build and enable ndb engine and the ndb suite(s) by default

    modified:
      mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-11-17 08:51:29 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-01-19 14:37:26 +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;
@@ -303,6 +304,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
 
@@ -1609,12 +1617,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
@@ -1699,12 +1708,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;
 }
@@ -2132,6 +2142,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"]);
@@ -2510,6 +2552,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-20110119143726-68a4xk7kusrfgtb9.bundle
Thread
bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3135) Magnus Blåudd19 Jan