diff --git a/dbug/dbug.c b/dbug/dbug.c index 9d638c299d3..7f4292d18b1 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -1826,7 +1826,13 @@ static void DBUGOpenFile(CODE_STATE *cs, else { newfile= !EXISTS(name); - if (!(fp= fopen(name, append ? "a+" : "w"))) + if (!(fp= fopen(name, +#if defined(MSDOS) || defined(__WIN__) + append ? "a+c" : "wc" +#else + append ? "a+" : "w" +#endif + ))) { (void) fprintf(stderr, ERR_OPEN, cs->process, name); perror(""); @@ -2231,23 +2237,9 @@ static void dbug_flush(CODE_STATE *cs) if (cs->stack->flags & FLUSH_ON_WRITE) #endif { -#if defined(MSDOS) || defined(__WIN__) - if (cs->stack->out_file != stdout && cs->stack->out_file != stderr) - { - if (!(freopen(cs->stack->name,"a",cs->stack->out_file))) - { - (void) fprintf(stderr, ERR_OPEN, cs->process, cs->stack->name); - fflush(stderr); - cs->stack->out_file= stderr; - } - } - else -#endif - { - (void) fflush(cs->stack->out_file); - if (cs->stack->delay) - (void) Delay(cs->stack->delay); - } + (void) fflush(cs->stack->out_file); + if (cs->stack->delay) + (void) Delay(cs->stack->delay); } if (!cs->locked) pthread_mutex_unlock(&THR_LOCK_dbug); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7b6ddf70d53..08584df44c8 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1019,12 +1019,14 @@ sub command_line_setup () { { $opt_testcase_timeout= $default_testcase_timeout; $opt_testcase_timeout*= 10 if $opt_valgrind; + $opt_testcase_timeout*= 10 if ($opt_debug and $glob_win32); } if ( ! $opt_suite_timeout ) { $opt_suite_timeout= $default_suite_timeout; $opt_suite_timeout*= 6 if $opt_valgrind; + $opt_suite_timeout*= 6 if ($opt_debug and $glob_win32); } if ( ! $opt_user )