From b40ef082c843a50992dbfefd214743f82d0ef481 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Mar 2007 11:41:29 +0100 Subject: [PATCH 1/4] MySQL versions before 5.0 still use cygwin, no need to convert path --- mysql-test/lib/mtr_misc.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index 880368be170..ef7dda358f2 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -54,6 +54,12 @@ sub mtr_short_hostname () { sub mtr_native_path($) { my $path= shift; + + # MySQL version before 5.0 still use cygwin, no need + # to convert path + return $path + if ($::mysql_version_id < 50000); + $path=~ s/\//\\/g if ($::glob_win32); return $path; From a01e8043de80c166f739e7603aa9cebf19da0abd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Mar 2007 18:30:29 +0100 Subject: [PATCH 2/4] Don't set the "is_windows" flag if using cygwin --- client/mysqltest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index 9141f9c518e..f678eb98eec 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -5933,7 +5933,9 @@ int main(int argc, char **argv) init_builtin_echo(); #ifdef __WIN__ +#ifndef USE_CYGWIN is_windows= 1; +#endif init_tmp_sh_file(); init_win_path_patterns(); #endif From ec38bd7a32115f70280d9047026ee7395225ccfc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Mar 2007 18:31:09 +0100 Subject: [PATCH 3/4] Fix bug in mtr.pl where slave wes using same query log file as master --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 21960d2bfcd..73396f2255b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3651,7 +3651,7 @@ sub mysqld_arguments ($$$$$) { if ( $mysql_version_id <= 50106 ) { # Force mysqld to use log files up until 5.1.6 - mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'}); + mtr_add_arg($args, "%s--log=%s", $prefix, $slave->[0]->{'path_mylog'}); } else { From 115a299ff3ce27b85d62ebc1b836c77e6fa4b5de Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Mar 2007 19:09:43 +0100 Subject: [PATCH 4/4] Add two more USE_CYGWIN ifdefs to mysqltest --- client/mysqltest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index f678eb98eec..d9f1f25e093 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1677,12 +1677,14 @@ void do_exec(struct st_command *command) } #ifdef __WIN__ +#ifndef USE_CYGWIN /* Replace /dev/null with NUL */ while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0) ; /* Replace "closed stdout" with non existing output fd */ while(replace(&ds_cmd, ">&-", 3, ">&4", 3) == 0) ; +#endif #endif DBUG_PRINT("info", ("Executing '%s' as '%s'", @@ -1847,10 +1849,12 @@ void do_system(struct st_command *command) do_eval(&ds_cmd, command->first_argument, command->end, !is_windows); #ifdef __WIN__ +#ifndef USE_CYGWIN /* Replace /dev/null with NUL */ while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0) ; #endif +#endif DBUG_PRINT("info", ("running system command '%s' as '%s'",