Bug #24168 mysql-test-run not functioning in autotest (cannot use external cluster)
Submitted: 10 Nov 2006 5:56 Modified: 8 Jun 2007 22:00
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version: OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[10 Nov 2006 5:56] Stewart Smith
Description:
autotest cannot run mysqltestrun as it no longer functions with external clusters

How to repeat:
look at autotest output

Suggested fix:
make mysql-test-run.pl again allow connections to other clusters
[15 Nov 2006 11:42] Matthias Leich
This affects also every extra QA test running against an already started server.
I am now blocked because of this bug in several WL tasks.
Therefore I rise the priority to P1.

How to reproduce this bug:
./mysql-test-run.pl --start-and-exit
# I hope there is no bug within the next command line  :-)
./mysql-test-run.pl --extern --socket=var/tmp/master.sock alias
Output:
Logging: ./mysql-test-run.pl --extern --socket=var/tmp/master.sock alias
MySQL Version 5.1.13
....
mysql-test-run: WARNING: Could not parse variable list line : 
Removing Stale Files
=======================================================
Starting Tests in the 'main' suite

TEST       RESULT         TIME (ms)
-------------------------------------------------------

alias      [ skipped ]   Can't restart a running server
-------------------------------------------------------
[15 Nov 2006 15:06] Stewart Smith
Matthias, it's actually a different problem for --extern not working. For NDB we can have mysql-test-run.pl start its own mysql server, but that server should connect to an existing cluster.

the code for --extern for a mysql server is different.

there may already be a bug for this... there was talk a few days ago on #mysql or #dev on internal irc
[24 Jan 2007 8:57] Stewart Smith
The following patch seems to help me:

===== mysql-test/mysql-test-run.pl 1.261 vs edited =====
--- 1.261/mysql-test/mysql-test-run.pl  2007-01-19 04:18:56 +11:00
+++ edited/mysql-test/mysql-test-run.pl 2007-01-24 19:31:29 +11:00
@@ -3095,7 +3095,7 @@
       }
 
       # If test needs this cluster, check it was installed ok
-      if ( !$cluster->{'installed_ok'} )
+      if ( !$opt_extern && !$cluster->{'installed_ok'} )
       {
        mtr_report_test_name($tinfo);
        $tinfo->{comment}=
@@ -4050,7 +4050,7 @@
     $do_restart= 1;           # Restart without cluster
     mtr_verbose("Restart master: Test does not need cluster");
   }
-  elsif ( ! $opt_skip_ndbcluster and
+  elsif ( !$opt_extern and ! $opt_skip_ndbcluster and
          $tinfo->{'ndb_test'} and
          $clusters->[0]->{'pid'} == 0 )
   {
[16 May 2007 7:31] Stewart Smith
proposed patch

Attachment: bug24168_extern_ndbcluster.patch (text/x-patch), 3.28 KiB.

[16 May 2007 8:31] Magnus Blåudd
I assume it's the problem that can be seen on http://ndb.mysql.com/~ndbdev/report.pl?id=1368 that this bug concerns

atrt-mysql-test-run --force 	FAILED(TEST) 	  	00:00:06 	log 	X
<snip>

With the log of first ndb api like this:
Logging: ./mysql-test-run --with-ndbcluster --ndb-connectstring=dl145a:14000 --force
MySQL Version 5.1.18
Using binlog format 'mixed'
Using default engine 'ndbcluster'
[1 Jun 2007 5:34] Stewart Smith
Looks good to me - have briefly tested and seems to work.

So this should enable us to start using it with atrt again.
[1 Jun 2007 12:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27909

ChangeSet@1.2517, 2007-06-01 14:32:26+02:00, msvensson@pilot.(none) +2 -0
  Bug #24168 mysql-test-run not functioning in autotest (cannot use external cluster)
   - Removed the global variable(s) glob_use_running_cluster/slave
     and put a property on each "cluster" called "use_running" which
     is set to 1 if user passed either ndb_connectstring or 
     ndb_connectstring_slave. Thus mtr.pl should not start/stop the
     cluster.
[6 Jun 2007 16:55] Bugs System
Pushed into 5.1.20-beta
[8 Jun 2007 22:00] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Testing only, no end-user changes to document. Closed.