summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-07-06 22:21:35 +0200
committerunknown <kent@mysql.com>2005-07-06 22:21:35 +0200
commit0f06342304519f5b3c5e43045dca2a2b03ff1dc0 (patch)
tree8eaab48e4fee3007444f12d5add27866465eb699 /mysql-test
parentb5081acd660fef8092d119287388f6f37e4c6e49 (diff)
downloadmariadb-git-0f06342304519f5b3c5e43045dca2a2b03ff1dc0.tar.gz
mtr_misc.pl:
Corrected appending of .exe to Windows executables Don't alter read only @_ in foreach loop mysql-test-run.pl: Improved cleanup of binlogs Use separate log file for second master Corrected Windows paths to executables mysql-test/mysql-test-run.pl: Improved cleanup of binlogs Use separate log file for second master Corrected Windows paths to executables mysql-test/lib/mtr_misc.pl: Corrected appending of .exe to Windows executables Don't alter read only @_ in foreach loop
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/mtr_misc.pl11
-rwxr-xr-xmysql-test/mysql-test-run.pl40
2 files changed, 30 insertions, 21 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index aba6f78c9de..c1aab340a16 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -83,18 +83,19 @@ sub mtr_script_exists (@) {
}
sub mtr_exe_exists (@) {
- foreach my $path ( @_ )
+ my @path= @_;
+ map {$_.= ".exe"} @path if $::glob_win32;
+ foreach my $path ( @path )
{
- $path.= ".exe" if $::opt_win32;
return $path if -x $path;
}
- if ( @_ == 1 )
+ if ( @path == 1 )
{
- mtr_error("Could not find $_[0]");
+ mtr_error("Could not find $path[0]");
}
else
{
- mtr_error("Could not find any of " . join(" ", @_));
+ mtr_error("Could not find any of " . join(" ", @path));
}
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e2637cfa6ee..4272c05f7dc 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -792,13 +792,15 @@ sub executable_setup () {
my $path_examples= "$glob_basedir/libmysqld/examples";
$exe_mysqltest= mtr_exe_exists("$path_examples/mysqltest");
$exe_mysql_client_test=
- mtr_exe_exists("$path_examples/mysql_client_test_embedded");
+ mtr_exe_exists("$path_examples/mysql_client_test_embedded",
+ "/usr/bin/false");
}
else
{
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
$exe_mysql_client_test=
- mtr_exe_exists("$glob_basedir/tests/mysql_client_test");
+ mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
+ "/usr/bin/false");
}
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
@@ -820,7 +822,8 @@ sub executable_setup () {
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_fix_system_tables=
- mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables");
+ mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
+ "$glob_basedir/scripts/mysql_fix_privilege_tables");
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
"$glob_basedir/share/english/");
@@ -834,13 +837,15 @@ sub executable_setup () {
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest_embedded");
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test_embedded",
- "$path_client_bindir/mysql_client_test_embedded");
+ "$path_client_bindir/mysql_client_test_embedded",
+ "/usr/bin/false");
}
else
{
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
$exe_mysql_client_test=
- mtr_exe_exists("$path_client_bindir/mysql_client_test");
+ mtr_exe_exists("$path_client_bindir/mysql_client_test",
+ "/usr/bin/false"); # FIXME temporary
}
$path_ndb_tools_dir= "$glob_basedir/bin";
@@ -1552,17 +1557,17 @@ sub do_before_start_master ($$) {
$tname ne "rpl_crash_binlog_ib_3b")
{
# FIXME we really want separate dir for binlogs
- foreach my $bin ( glob("$opt_vardir/log/master*-bin.*") )
+ foreach my $bin ( glob("$opt_vardir/log/master*-bin*") )
{
unlink($bin);
}
}
# Remove old master.info and relay-log.info files
- unlink("$opt_vardir/master-data/master.info");
- unlink("$opt_vardir/master-data/relay-log.info");
- unlink("$opt_vardir/master1-data/master.info");
- unlink("$opt_vardir/master1-data/relay-log.info");
+ unlink("$master->[0]->{'path_myddir'}/master.info");
+ unlink("$master->[0]->{'path_myddir'}/relay-log.info");
+ unlink("$master->[1]->{'path_myddir'}/master.info");
+ unlink("$master->[1]->{'path_myddir'}/relay-log.info");
# Run master initialization shell script if one exists
if ( $init_script )
@@ -1589,13 +1594,13 @@ sub do_before_start_slave ($$) {
$tname ne "rpl_crash_binlog_ib_3b" )
{
# FIXME we really want separate dir for binlogs
- foreach my $bin ( glob("$opt_vardir/log/slave*-bin.*") )
+ foreach my $bin ( glob("$opt_vardir/log/slave*-bin*") )
{
unlink($bin);
}
# FIXME really master?!
- unlink("$opt_vardir/slave-data/master.info");
- unlink("$opt_vardir/slave-data/relay-log.info");
+ unlink("$slave->[0]->{'path_myddir'}/master.info");
+ unlink("$slave->[0]->{'path_myddir'}/relay-log.info");
}
# Run slave initialization shell script if one exists
@@ -1609,8 +1614,10 @@ sub do_before_start_slave ($$) {
}
}
- `rm -f $opt_vardir/slave-data/log.*`;
-# unlink("$opt_vardir/slave-data/log.*");
+ foreach my $bin ( glob("$slave->[0]->{'path_myddir'}/log.*") )
+ {
+ unlink($bin);
+ }
}
sub mysqld_arguments ($$$$$) {
@@ -1656,7 +1663,8 @@ sub mysqld_arguments ($$$$$) {
if ( $type eq 'master' )
{
- mtr_add_arg($args, "%s--log-bin=%s/log/master-bin", $prefix, $opt_vardir);
+ mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix,
+ $opt_vardir, $sidx);
mtr_add_arg($args, "%s--pid-file=%s", $prefix,
$master->[$idx]->{'path_mypid'});
mtr_add_arg($args, "%s--port=%d", $prefix,