List:Commits« Previous MessageNext Message »
From:msvensson Date:April 23 2008 6:50pm
Subject:bk commit into 5.1 tree (msvensson:1.2587)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson.  When msvensson does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-23 20:50:25+02:00, msvensson@stripped +3 -0
  Call stop_all_servers also for embedded - the ndb servers might be started
  Always run_master_init_script just before starting mysqltest_embedded
  Remove the include of have_multi_ndb.inc from have_ndb.inc
  Make have_ndb.inc check if the server has ndb support
  Can't run ndb_multi tests with embedded since there is only one "server"

  mysql-test/include/have_multi_ndb.inc@stripped, 2008-04-23 20:50:23+02:00, msvensson@stripped +6 -12
    Can't run ndb_multi tests with embedded since there is only one "server".

  mysql-test/include/have_ndb.inc@stripped, 2008-04-23 20:50:23+02:00, msvensson@stripped +35 -1
    Remove the include of have_multi_ndb.inc from have_ndb.inc
    Make have_ndb.inc check if the server has ndb support

  mysql-test/mysql-test-run.pl@stripped, 2008-04-23 20:50:23+02:00, msvensson@stripped +10 -12
    Call stop_all_servers also for embedded - the ndb servers might be started
    Always run_master_init_script just before starting mysqltest_embedded

diff -Nrup a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
--- a/mysql-test/include/have_multi_ndb.inc	2008-02-13 15:42:35 +01:00
+++ b/mysql-test/include/have_multi_ndb.inc	2008-04-23 20:50:23 +02:00
@@ -1,16 +1,10 @@
+# Embedded server can't run the multi tests since we only have
+# one server
+source include/not_embedded.inc;
+
 # Setup connections to both MySQL Servers connected to the cluster
-# a bit different if in embedded and not
--- let have_embedded=`select version() like '%embedded%'`
-if ($have_embedded)
-{
-  connect (server1,localhost,root,,test);
-  connect (server2,localhost,root,,test);
-}
-if (!$have_embedded)
-{
-  connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,);
-  connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
-}
+connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
 
 # Check that server1 has NDB  support
 connection server1;
diff -Nrup a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
--- a/mysql-test/include/have_ndb.inc	2008-03-17 12:17:44 +01:00
+++ b/mysql-test/include/have_ndb.inc	2008-04-23 20:50:23 +02:00
@@ -1 +1,35 @@
--- source include/have_multi_ndb.inc
+#
+# Check if cluster is available by selecting from is.engines
+# if an error about no such table occurs bail out
+#
+
+disable_result_log;
+disable_query_log;
+--error 0, 1109
+select @have_ndb:= count(*) from information_schema.engines where engine='ndbcluster' and support in ('YES', 'DEFAULT', 'ENABLED');
+enable_query_log;
+enable_result_log;
+
+if ($mysql_errno){
+  # For backward compatibility, implement old fashioned way
+  # to check here ie. use SHOW VARIABLES LIKE "have_ndb"
+  die Can not determine if server supports ndb without is.engines table;
+}
+
+
+if (!`select @have_ndb`){
+  skip Need ndb engine;
+}
+
+# cleanup
+
+disable_query_log;
+disable_warnings;
+--error 0,1051
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+flush tables;
+flush status;
+enable_warnings;
+enable_query_log;
+
+
diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2008-04-08 14:51:42 +02:00
+++ b/mysql-test/mysql-test-run.pl	2008-04-23 20:50:23 +02:00
@@ -2947,8 +2947,7 @@ sub run_tests () {
   mtr_print_line();
 
   if ( ! $glob_debugger and
-       ! $opt_extern and
-       ! $glob_use_embedded_server )
+       ! $opt_extern )
   {
     stop_all_servers();
   }
@@ -3568,10 +3567,6 @@ sub run_testcase ($) {
       return 1;
     }
   }
-  elsif ($glob_use_embedded_server)
-  {
-    run_master_init_script($tinfo);
-  }
 
   # ----------------------------------------------------------------------
   # If --start-and-exit or --start-dirty given, stop here to let user manually
@@ -3585,6 +3580,13 @@ sub run_testcase ($) {
   }
 
   {
+    if ($glob_use_embedded_server)
+    {
+      # Run any master init script before
+      # starting mysqltest_embedded
+      run_master_init_script($tinfo);
+    }
+
     do_before_run_mysqltest($tinfo);
 
     my $res= run_mysqltest($tinfo);
@@ -3733,8 +3735,7 @@ sub report_failure_and_restart ($) {
   mtr_report("Aborting: $tinfo->{'name'} failed in $test_mode mode. ");
   mtr_report("To continue, re-run with '--force'.");
   if ( ! $glob_debugger and
-       ! $opt_extern and
-       ! $glob_use_embedded_server )
+       ! $opt_extern )
   {
     stop_all_servers();
   }
@@ -4811,10 +4812,7 @@ sub run_report_features () {
   $tinfo->{'comment'} = 'report server features';
   run_mysqltest($tinfo);
 
-  if ( ! $glob_use_embedded_server )
-  {
-    stop_all_servers();
-  }
+  stop_all_servers();
 }
 
 
Thread
bk commit into 5.1 tree (msvensson:1.2587)msvensson23 Apr