summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-03-01 18:12:56 +0100
committerunknown <msvensson@pilot.blaudden>2007-03-01 18:12:56 +0100
commit4a9edcc32c7addea01e7e5b80e452939e7de07c7 (patch)
treedd839a6db9e2985054d2bc99faaafdc4440866fc /mysql-test/mysql-test-run.pl
parentb9c36948f44b39cb2a9d4c80ea3bbb321ec1e045 (diff)
parent3616b5e3d574de6863cb9aaa6a642ba67401956b (diff)
downloadmariadb-git-4a9edcc32c7addea01e7e5b80e452939e7de07c7.tar.gz
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint BitKeeper/etc/ignore: auto-union client/mysqltest.c: Auto merged extra/comp_err.c: Auto merged include/my_time.h: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/tztime.cc: Auto merged client/mysql_upgrade.c: Manual merge mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_cp932.result: Manual merge mysql-test/r/mysqlbinlog.result: Manual merge mysql-test/t/ctype_cp932.test: Manual merge mysql-test/t/mysql.test: Manual merge mysql-test/t/mysqlbinlog.test: Manual merge
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl177
1 files changed, 99 insertions, 78 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index a04ace73bc1..4d385ddee66 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -702,7 +702,9 @@ sub command_line_setup () {
"$glob_basedir/client",
"$glob_basedir/bin");
- $exe_mysqld= mtr_exe_exists (vs_config_dirs('sql', 'mysqld'),
+ if (!$opt_extern)
+ {
+ $exe_mysqld= mtr_exe_exists (vs_config_dirs('sql', 'mysqld'),
"$glob_basedir/sql/mysqld",
"$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
@@ -714,8 +716,16 @@ sub command_line_setup () {
"$glob_basedir/bin/mysqld",
"$glob_basedir/sbin/mysqld");
- # Use the mysqld found above to find out what features are available
- collect_mysqld_features();
+ # Use the mysqld found above to find out what features are available
+ collect_mysqld_features();
+ }
+ else
+ {
+ $mysqld_variables{'port'}= 3306;
+ $mysqld_variables{'master-port'}= 3306;
+ $opt_skip_ndbcluster= 1;
+ $opt_skip_im= 1;
+ }
if ( $opt_comment )
{
@@ -752,7 +762,7 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# NOTE if the default binlog format is changed, this has to be changed
$used_binlog_format= "stmt";
- if ( $mysql_version_id >= 50100 )
+ if (!$opt_extern && $mysql_version_id >= 50100 )
{
$used_binlog_format= "mixed"; # Default value for binlog format
@@ -838,19 +848,20 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Check im suport
# --------------------------------------------------------------------------
- if ( $mysql_version_id < 50000 )
+ if (!$opt_extern)
{
- # Instance manager is not supported until 5.0
- $opt_skip_im= 1;
+ if ( $mysql_version_id < 50000 ) {
+ # Instance manager is not supported until 5.0
+ $opt_skip_im= 1;
- }
+ }
- if ( $glob_win32 )
- {
- mtr_report("Disable Instance manager - not supported on Windows");
- $opt_skip_im= 1;
- }
+ if ( $glob_win32 ) {
+ mtr_report("Disable Instance manager - not supported on Windows");
+ $opt_skip_im= 1;
+ }
+ }
# --------------------------------------------------------------------------
# Record flag
# --------------------------------------------------------------------------
@@ -1214,7 +1225,7 @@ sub command_line_setup () {
$opt_skip_rpl= 1;
# Setup master->[0] with the settings for the extern server
- $master->[0]->{'path_sock'}= $opt_socket if $opt_socket;
+ $master->[0]->{'path_sock'}= $opt_socket ? $opt_socket : "/tmp/mysql.sock";
mtr_report("Using extern server at '$master->[0]->{path_sock}'");
}
else
@@ -1480,60 +1491,58 @@ sub executable_setup () {
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
- if ( $mysql_version_id >= 50100 )
- {
- $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
- }
- if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server )
- {
- $exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
- }
- else
- {
- $exe_mysql_upgrade= "";
- }
- if ( ! $glob_win32 )
+ if (!$opt_extern)
{
- # Look for mysql_fix_system_table script
- $exe_mysql_fix_system_tables=
- mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
- "$path_client_bindir/mysql_fix_privilege_tables");
-
- }
# Look for SQL scripts directory
$path_sql_dir= mtr_path_exists("$glob_basedir/share",
"$glob_basedir/scripts");
- # Look for mysql_fix_privilege_tables.sql script
- $file_mysql_fix_privilege_tables=
- mtr_file_exists("$path_sql_dir/mysql_fix_privilege_tables.sql");
+ if ( $mysql_version_id >= 50100 ) {
+ $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
+ }
+ if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server ) {
+ $exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
+ } else {
+ $exe_mysql_upgrade= "";
+ }
+
+ if ( ! $glob_win32 ) {
+ # Look for mysql_fix_system_table script
+ $exe_mysql_fix_system_tables=
+ mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
+ "$path_client_bindir/mysql_fix_privilege_tables");
+ }
- if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
- {
- mtr_warning("Could not find all required ndb binaries, " .
- "all ndb tests will fail, use --skip-ndbcluster to " .
- "skip testing it.");
+ # Look for mysql_fix_privilege_tables.sql script
+ $file_mysql_fix_privilege_tables=
+ mtr_file_exists("$glob_basedir/scripts/mysql_fix_privilege_tables.sql",
+ "$glob_basedir/share/mysql_fix_privilege_tables.sql");
- foreach my $cluster (@{$clusters})
- {
- $cluster->{"executable_setup_failed"}= 1;
+ if ( ! $opt_skip_ndbcluster and executable_setup_ndb()) {
+ mtr_warning("Could not find all required ndb binaries, " .
+ "all ndb tests will fail, use --skip-ndbcluster to " .
+ "skip testing it.");
+
+ foreach my $cluster (@{$clusters}) {
+ $cluster->{"executable_setup_failed"}= 1;
+ }
}
- }
- if ( ! $opt_skip_im and executable_setup_im())
- {
- mtr_warning("Could not find all required instance manager binaries, " .
- "all im tests will fail, use --skip-im to " .
- "continue without instance manager");
- $instance_manager->{"executable_setup_failed"}= 1;
- }
+ if ( ! $opt_skip_im and executable_setup_im()) {
+ mtr_warning("Could not find all required instance manager binaries, " .
+ "all im tests will fail, use --skip-im to " .
+ "continue without instance manager");
+ $instance_manager->{"executable_setup_failed"}= 1;
+ }
- # Look for the udf_example library
- $lib_udf_example=
- mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
- "$glob_basedir/sql/.libs/udf_example.so",);
+ # Look for the udf_example library
+ $lib_udf_example=
+ mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
+ "$glob_basedir/sql/.libs/udf_example.so",);
+
+ }
# Look for mysqltest executable
if ( $glob_use_embedded_server )
@@ -1601,7 +1610,7 @@ sub mysql_client_test_arguments()
mtr_add_arg($args, "--port=$master->[0]->{'port'}");
mtr_add_arg($args, "--socket=$master->[0]->{'path_sock'}");
- if ( $mysql_version_id >= 50000 )
+ if ( $opt_extern || $mysql_version_id >= 50000 )
{
mtr_add_arg($args, "--vardir=$opt_vardir")
}
@@ -1712,7 +1721,7 @@ sub environment_setup () {
}
$ENV{'LD_LIBRARY_PATH'}= join(":", @ld_library_paths,
- $ENV{'LD_LIBRARY_PATHS'} ?
+ $ENV{'LD_LIBRARY_PATH'} ?
split(':', $ENV{'LD_LIBRARY_PATH'}) : ());
mtr_debug("LD_LIBRARY_PATH: $ENV{'LD_LIBRARY_PATH'}");
@@ -1897,7 +1906,7 @@ sub environment_setup () {
my $cmdline_mysqlbinlog=
mtr_native_path($exe_mysqlbinlog) .
" --no-defaults --local-load=$opt_tmpdir";
- if ( $mysql_version_id >= 50000 )
+ if (!$opt_extern && $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
}
@@ -1929,7 +1938,7 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute mysql_upgrade
# ----------------------------------------------------
- if ( $mysql_version_id >= 50000 )
+ if ( !$opt_extern && $mysql_version_id >= 50000 )
{
$ENV{'MYSQL_UPGRADE'}= mysql_upgrade_arguments();
}
@@ -1937,7 +1946,7 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute mysql_fix_system_tables
# ----------------------------------------------------
- if ( ! $glob_win32 )
+ if ( !$opt_extern && ! $glob_win32 )
{
my $cmdline_mysql_fix_system_tables=
"$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
@@ -1948,7 +1957,10 @@ sub environment_setup () {
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
}
- $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
+ if (!$opt_extern)
+ {
+ $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
+ }
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
@@ -2262,7 +2274,10 @@ sub check_ssl_support ($) {
if ($opt_skip_ssl || $opt_extern)
{
- mtr_report("Skipping SSL");
+ if (!$opt_extern)
+ {
+ mtr_report("Skipping SSL");
+ }
$opt_ssl_supported= 0;
$opt_ssl= 0;
return;
@@ -2337,9 +2352,12 @@ sub vs_config_dirs ($$) {
sub check_ndbcluster_support ($) {
my $mysqld_variables= shift;
- if ($opt_skip_ndbcluster)
+ if ($opt_skip_ndbcluster || $opt_extern)
{
- mtr_report("Skipping ndbcluster");
+ if (!$opt_extern)
+ {
+ mtr_report("Skipping ndbcluster");
+ }
$opt_skip_ndbcluster_slave= 1;
return;
}
@@ -2755,7 +2773,10 @@ sub initialize_servers () {
}
else
{
- mtr_report("No need to create '$opt_vardir' it already exists");
+ if ($opt_verbose)
+ {
+ mtr_report("No need to create '$opt_vardir' it already exists");
+ }
}
}
else
@@ -3157,17 +3178,17 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings");
- if ( $mysql_version_id < 50000 )
- {
- # Set environment variable NDB_STATUS_OK to 1
- # if script decided to run mysqltest cluster _is_ installed ok
- $ENV{'NDB_STATUS_OK'} = "1";
- }
- elsif ( $mysql_version_id < 50100 )
+ if (!$opt_extern)
{
- # Set environment variable NDB_STATUS_OK to YES
- # if script decided to run mysqltest cluster _is_ installed ok
- $ENV{'NDB_STATUS_OK'} = "YES";
+ if ( $mysql_version_id < 50000 ) {
+ # Set environment variable NDB_STATUS_OK to 1
+ # if script decided to run mysqltest cluster _is_ installed ok
+ $ENV{'NDB_STATUS_OK'} = "1";
+ } elsif ( $mysql_version_id < 50100 ) {
+ # Set environment variable NDB_STATUS_OK to YES
+ # if script decided to run mysqltest cluster _is_ installed ok
+ $ENV{'NDB_STATUS_OK'} = "YES";
+ }
}
}
@@ -4949,10 +4970,10 @@ sub usage ($) {
if ( $message )
{
- print STDERR "$message \n";
+ print STDERR "$message\n";
}
- print STDERR <<HERE;
+ print <<HERE;
$0 [ OPTIONS ] [ TESTCASE ]