List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:November 4 2012 9:58pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:4065 to 4067)
View as plain text  
 4067 magnus.blaudd@stripped	2012-11-04
      Cherrypick mtr.pl fix from 5.5

    modified:
      mysql-test/mysql-test-run.pl
 4066 magnus.blaudd@stripped	2012-11-04
      Cherrypick mtr.pl fix from 5.5

    modified:
      mysql-test/lib/mtr_cases.pm
      mysql-test/mysql-test-run.pl
 4065 magnus.blaudd@stripped	2012-11-02
      ndb
       - disable pfs_upgrade, it fails everytime we change mysql-system_tables.sql
       and also have been removed in the future(causing conflicts).

    modified:
      mysql-test/suite/perfschema/t/disabled.def
=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2012-10-22 13:09:36 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2012-11-04 21:14:46 +0000
@@ -962,18 +962,11 @@ sub collect_one_test_case {
   if ( $tinfo->{'ndb_test'} )
   {
     # This is a NDB test
-    if ( $::opt_skip_ndbcluster == 2 )
+    if ( $::ndbcluster_enabled == 0)
     {
-      # Ndb is not supported, skip it
+      # ndbcluster is disabled
       $tinfo->{'skip'}= 1;
-      $tinfo->{'comment'}= "No ndbcluster support or ndb tests not enabled";
-      return $tinfo;
-    }
-    elsif ( $::opt_skip_ndbcluster )
-    {
-      # All ndb test's should be skipped
-      $tinfo->{'skip'}= 1;
-      $tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
+      $tinfo->{'comment'}= "ndbcluster disabled";
       return $tinfo;
     }
   }

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2012-10-22 13:09:36 +0000
+++ b/mysql-test/mysql-test-run.pl	2012-11-04 21:17:46 +0000
@@ -310,8 +310,9 @@ sub check_timeout ($) { return testcase_
 
 our $opt_warnings= 1;
 
-our $opt_include_ndbcluster= 0;
-our $opt_skip_ndbcluster= 1;
+our $ndbcluster_enabled= 0;
+my $opt_include_ndbcluster= 0;
+my $opt_skip_ndbcluster= 0;
 
 my $exe_ndbd;
 my $exe_ndbmtd;
@@ -365,26 +366,6 @@ sub main {
 
   if (!$opt_suites) {
     $opt_suites= $DEFAULT_SUITES;
-
-    # Check for any extra suites to enable based on the path name
-    my %extra_suites=
-      (
-       "mysql-5.1-new-ndb"              => "ndb_team",
-       "mysql-5.1-new-ndb-merge"        => "ndb_team",
-       "mysql-5.1-telco-6.2"            => "ndb_team",
-       "mysql-5.1-telco-6.2-merge"      => "ndb_team",
-       "mysql-5.1-telco-6.3"            => "ndb_team",
-       "mysql-6.0-ndb"                  => "ndb_team",
-      );
-
-    foreach my $dir ( reverse splitdir($basedir) ) {
-      my $extra_suite= $extra_suites{$dir};
-      if (defined $extra_suite) {
-	mtr_report("Found extra suite: $extra_suite");
-	$opt_suites= "$extra_suite,$opt_suites";
-	last;
-      }
-    }
   }
   mtr_report("Using suites: $opt_suites") unless @opt_cases;
 
@@ -408,7 +389,6 @@ sub main {
     unshift(@$tests, $tinfo);
   }
 
-  print "vardir: $opt_vardir\n";
   initialize_servers();
 
   #######################################################################
@@ -1069,7 +1049,7 @@ sub command_line_setup {
              # Control what test suites or cases to run
              'force'                    => \$opt_force,
              'with-ndbcluster-only'     => \&collect_option,
-             'include-ndbcluster'       => \$opt_include_ndbcluster,
+             'ndb|include-ndbcluster'   => \$opt_include_ndbcluster,
              'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
              'suite|suites=s'           => \$opt_suites,
              'skip-rpl'                 => \&collect_option,
@@ -1518,7 +1498,6 @@ sub command_line_setup {
       }
       $ENV{'PATH'}= "$ENV{'PATH'}".$separator.$lib_mysqld;
     }
-    $opt_skip_ndbcluster= 1;       # Turn off use of NDB cluster
     $opt_skip_ssl= 1;              # Turn off use of SSL
 
     # Turn off use of bin log
@@ -2002,7 +1981,7 @@ sub executable_setup () {
 
   $exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
 
-  if ( ! $opt_skip_ndbcluster )
+  if ( $ndbcluster_enabled )
   {
     # Look for single threaded NDB
     $exe_ndbd=
@@ -2273,7 +2252,7 @@ sub environment_setup {
   # --------------------------------------------------------------------------
   # Add the path where libndbclient can be found
   # --------------------------------------------------------------------------
-  if ( !$opt_skip_ndbcluster )
+  if ( $ndbcluster_enabled )
   {
     push(@ld_library_paths,  
 	 "$basedir/storage/ndb/src/.libs",
@@ -2363,7 +2342,7 @@ sub environment_setup {
   # ----------------------------------------------------
   # Setup env for NDB
   # ----------------------------------------------------
-  if ( ! $opt_skip_ndbcluster )
+  if ( $ndbcluster_enabled )
   {
     $ENV{'NDB_MGM'}=
       my_find_bin($bindir,
@@ -2786,38 +2765,87 @@ sub vs_config_dirs ($$) {
 sub check_ndbcluster_support ($) {
   my $mysqld_variables= shift;
 
+  my $ndbcluster_supported = 0;
+  if ($mysqld_variables{'ndb-connectstring'})
+  {
+    $ndbcluster_supported = 1;
+  }
+
+  if ($opt_skip_ndbcluster && $opt_include_ndbcluster)
+  {
+    # User is ambivalent. Theoretically the arg which was
+    # given last on command line should win, but that order is
+    # unknown at this time.
+    mtr_error("Ambigous command, both --include-ndbcluster " .
+	      " and --skip-ndbcluster was specified");
+  }
+
   # 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-([0-9]*)\.([0-9]*)\.([0-9]*)/ )
   {
-    mtr_report(" - MySQL Cluster");
-    # Enable ndb engine and add more test suites
-    $opt_include_ndbcluster = 1;
-    $DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
-  }
+    # MySQL Cluster tree
+    mtr_report(" - MySQL Cluster detected");
 
+    if ($opt_skip_ndbcluster)
+    {
+      mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
+      return;
+    }
 
-  if ($opt_include_ndbcluster)
-  {
-    $opt_skip_ndbcluster= 0;
-  }
+    if (!$ndbcluster_supported)
+    {
+      # MySQL Cluster tree, but mysqld was not compiled with
+      # ndbcluster -> fail unless --skip-ndbcluster was used
+      mtr_error("This is MySQL Cluster but mysqld does not " .
+		"support ndbcluster. Use --skip-ndbcluster to " .
+		"force mtr to run without it.");
+    }
 
-  if ($opt_skip_ndbcluster)
-  {
-    mtr_report(" - skipping ndbcluster");
-    return;
+    # mysqld was compiled with ndbcluster -> auto enable
   }
-
-  if ( ! $mysqld_variables{'ndb-connectstring'} )
+  else
   {
-    mtr_report(" - skipping ndbcluster, mysqld not compiled with ndbcluster");
-    $opt_skip_ndbcluster= 2;
-    return;
-  }
+    # Not a MySQL Cluster tree
+    if (!$ndbcluster_supported)
+    {
+      if ($opt_include_ndbcluster)
+      {
+	mtr_error("Could not detect ndbcluster support ".
+		  "requested with --include-ndbcluster");
+      }
+
+      # Silently skip, mysqld was compiled without ndbcluster
+      # which is the default case
+      return;
+    }
+
+    if ($opt_skip_ndbcluster)
+    {
+      # Compiled with ndbcluster but ndbcluster skipped
+      mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
+      return;
+    }
 
-  mtr_report(" - using ndbcluster when necessary, mysqld supports it");
 
+    # Not a MySQL Cluster tree, enable ndbcluster
+    # if --include-ndbcluster was used
+    if ($opt_include_ndbcluster)
+    {
+      # enable ndbcluster
+    }
+    else
+    {
+      mtr_report(" - skipping ndbcluster(disabled by default)");
+      return;
+    }
+  }
+
+  mtr_report(" - enabling ndbcluster");
+  $ndbcluster_enabled= 1;
+  # Add MySQL Cluster test suites
+  $DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
   return;
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:4065 to 4067) magnus.blaudd5 Nov