Hi Georgi,
I don't really see how this patch is related to the problem at hand. The
original problem the bug reports is that you get and additional warning
in the result file.
***r/system_mysql_db.result Sun Mar 11 22:51:31 2007
--- r/system_mysql_db.reject Sun Mar 11 23:29:06 2007
***************
*** 251,255 ****
--- 251,257 ----
`server_id` int(11) DEFAULT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
+ Warnings:
+ Error 1194 Table 'slow_log' is marked as crashed and should be repaired
show tables;
Tables_in_test
-------------------------------------------------------
And I assume that is not fixed by the patch?
But, lately we have been seeing that system_mysql_db fails with timeout in PushBuild
and I guess that is what the patch intend to fix? It's strange though that we get these
timeout failures when running with a release compiled mysqld and thus no code from dbug.c
should be involved. We don't pass --debug to mysql-test-run.pl either so how would we need
extend the timeout?
I think there must be some other problem.
Best regards
Magnus
mån 2007-10-15 klockan 19:56 +0300 skrev kgeorge@stripped:
> Below is the list of changes that have just been committed into a local
> 5.1 repository of kgeorge. When kgeorge does a push these changes will
> be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2007-10-15 19:56:24+03:00, gkodinov@stripped +2 -0
> Bug #27099: system_mysql fail in pushbuild windows
>
> On Windows the debug log was doing freopen () instead of
> fflush() and that was slowing the logging down that much
> that some tests timed out.
> Fixed by replacing the freopen() with an syncing-to-disk
> flag to fopen() and fflush().
> Also increased the timeout of the tests running with --debug
> on windows : seems to slow down as much as valgrind on linux.
>
> dbug/dbug.c@stripped, 2007-10-15 19:56:22+03:00, gkodinov@stripped +10 -18
> Bug #27099: remove the freopen() for the
> windows log : too slow. Replace it with the "c" option
> for fopen().
>
> mysql-test/mysql-test-run.pl@stripped, 2007-10-15 19:56:22+03:00, gkodinov@stripped
> +2 -0
> Bug #27099: on windows debug log seems to slow the tests
> down about as much as valgrind does on linux.
>
> diff -Nrup a/dbug/dbug.c b/dbug/dbug.c
> --- a/dbug/dbug.c 2007-08-02 07:49:24 +03:00
> +++ b/dbug/dbug.c 2007-10-15 19:56:22 +03:00
> @@ -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 -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
> --- a/mysql-test/mysql-test-run.pl 2007-10-04 13:16:51 +03:00
> +++ b/mysql-test/mysql-test-run.pl 2007-10-15 19:56:22 +03:00
> @@ -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 )
>
--
Magnus Svensson
Senior Software Engineer
msvensson@stripped
+46709164491