Bug #9974 MySQLTest:Unexpected behaviour when mysql-test is invoked with extern parameter
Submitted: 18 Apr 2005 15:23 Modified: 7 Mar 2006 17:37
Reporter: Disha Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.3 OS:Linux (Linux 9.x)
Assigned to: Kent Boortz CPU Architecture:Any

[18 Apr 2005 15:23] Disha
Description:

When the "extern" parameter is specified and WITH NO Test File Name while invoking mysql-test, then the external server is not used, inspite of being specified in the command line.

How to repeat:
 1. Change directory to "mysql-test" directory in mysql.
 2. Start the mysql daemon on port 3306.
 3. Execute the "mysql-test-run.sh"   file with following parameters as :
	./mysql-test-run --extern --user=root --master_port=3306
    

Expected Results: 
Mysql test framework should use the mysql daemon running on port 3306 as external server to execute all the test files in the "t" folder.
    
Actual Results:
Mysql test framework uses a newly started server to execute all the test files in the "t" folder.

Suggested fix:
The following code on Line #677 - #682 mysql-test-run.sh. If we comment this, it solves the issue.

# If we should run all tests cases, we will use a local server for that...

# if [ -z "$1" ] then
#   USE_RUNNING_SERVER=0
# fi
[7 Mar 2006 17:37] Kent Boortz
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

The Bourne shell version of mysql-test-run is only for use
with the regression suite. As many of the test cases need
access to the "mysql-test/var/" directory, running all tests
with the --extern option will not work.

In 4.1 and up there is a Perl version of mysql-test-run.
This script has "suite" support and you don't have to
explicitly specify the test case name when --extern is
used.