List:Commits« Previous MessageNext Message »
From:Libing Song Date:October 30 2009 7:13am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Dao-Gang.Qu:3165)
Bug#34739
View as plain text  
Hi Daogang,
Nice work. patch approved.

Dao-Gang.Qu@stripped wrote:
> #At file:///home/daogangqu/mysql/bzrwork/bug34739/mysql-5.1-bugteam/ based on
> revid:dao-gang.qu@stripped
>
>  3165 Dao-Gang.Qu@stripped	2009-10-29
>       Bug #34739  unexpected binlog file name when --log-bin is set to a directory
> name
>       
>       If --log-bin is set to a directory name with the trailing 'FN_LIBCHAR', 
>       which will be '/' on Unix like systems, and '\\' on Windows like systems. 
>       the basename of the binlog is empty so that the created files named 
>       '.000001' and '.index'. It is not expected.
>       
>       To resolve the problem, the program should report an error and abort.
>      @ sql/mysqld.cc
>         Added a check for the value of the --log-bin argument, if it's 
>         a directory, reports an error and aborts.
>
>     modified:
>       sql/mysqld.cc
> === modified file 'sql/mysqld.cc'
> --- a/sql/mysqld.cc	2009-10-27 13:20:34 +0000
> +++ b/sql/mysqld.cc	2009-10-29 09:09:32 +0000
> @@ -3888,6 +3888,15 @@ server.");
>  
>    if (opt_bin_log)
>    {
> +    /* Reports an error and aborts, if the --log-bin's path 
> +       is a directory.*/
> +    if (opt_bin_logname[strlen(opt_bin_logname) - 1] == FN_LIBCHAR)
> +    {
> +      sql_print_error("Path '%s' is a directory name, please specify \
> +a file name for --log-bin option", opt_bin_logname);
> +      unireg_abort(1);
> +    }
> +
>      char buf[FN_REFLEN];
>      const char *ln;
>      ln= mysql_bin_log.generate_name(opt_bin_logname, "-bin", 1, buf);
>
>   
> ------------------------------------------------------------------------
>
>


-- 
Your Sincerely,
Libing Song
==================================
MySQL Replication Team
Software Engineer
Certified (ISC)2 CISSP

Email : Li-Bing.Song@stripped
Skype : libing.song
MSN   : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038
==================================

Thread
bzr commit into mysql-5.1-bugteam branch (Dao-Gang.Qu:3165) Bug#34739Dao-Gang.Qu29 Oct
  • Re: bzr commit into mysql-5.1-bugteam branch (Dao-Gang.Qu:3165)Bug#34739He Zhenxing29 Oct
    • Re: bzr commit into mysql-5.1-bugteam branch (Dao-Gang.Qu:3165)Bug#34739Daogang Qu30 Oct
  • Re: bzr commit into mysql-5.1-bugteam branch (Dao-Gang.Qu:3165)Bug#34739Libing Song30 Oct