List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:September 28 2010 7:11am
Subject:Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)
Bug#54144
View as plain text  
Hi Luís,

Thanks for fixing this. One typo, and since you fix the indentation for 
some lines, please fix the whole block of wrongly indented code. I think 
you can handle that without another round of reviews: Patch approved!

/Sven


Luis Soares wrote:
[...]
> === modified file 'sql/share/errmsg-utf8.txt'
> --- a/sql/share/errmsg-utf8.txt	2010-06-07 08:47:04 +0000
> +++ b/sql/share/errmsg-utf8.txt	2010-09-27 16:34:13 +0000
> +
> +ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN
> +  eng "The value for the heartbeat period is less than 1 milisecond. The period is
> reset to 0, meaning that heartbeating will effectively be disabled."

millisecond, two L

> +
> +ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX
> +  eng "The value for the heartbeat period exceeds the value of `slave_net_timeout'
> seconds. A sensible value for the period should be less than the timeout."
> 
> === modified file 'sql/sql_yacc.yy'
> --- a/sql/sql_yacc.yy	2010-09-01 13:12:42 +0000
> +++ b/sql/sql_yacc.yy	2010-09-27 16:34:13 +0000
> @@ -1935,32 +1935,25 @@ master_def:
>             if (Lex->mi.heartbeat_period > SLAVE_MAX_HEARTBEAT_PERIOD ||
>                 Lex->mi.heartbeat_period < 0.0)
>             {
> -             const char format[]= "%d seconds";
> -             char buf[4*sizeof(SLAVE_MAX_HEARTBEAT_PERIOD) + sizeof(format)];
> -             sprintf(buf, format, SLAVE_MAX_HEARTBEAT_PERIOD);
> -             my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> -                      MYF(0), " is negative or exceeds the maximum ", buf);
> +              const char format[]= "%d";
> +              char buf[4*sizeof(SLAVE_MAX_HEARTBEAT_PERIOD) + sizeof(format)];
> +              sprintf(buf, format, SLAVE_MAX_HEARTBEAT_PERIOD);
> +              my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE, MYF(0), buf);
>                MYSQL_YYABORT;
>              }

Good that you fix the indentation. Since you're editing this section, 
can you also fix the three lines above?

>              if (Lex->mi.heartbeat_period > slave_net_timeout)
>              {
>                push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
> -                                  ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> -                                  ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE),
> -                                  " exceeds the value of `slave_net_timeout' sec.",
> -                                  " A sensible value for the period should be"
> -                                  " less than the timeout.");
> +                                  ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX,
> +                                  ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX));
>              }
>              if (Lex->mi.heartbeat_period < 0.001)
>              {
>                if (Lex->mi.heartbeat_period != 0.0)
>                {
>                  push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
> -                                    ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> -                                    ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE),
> -                                    " is less than 1 msec.",
> -                                    " The period is reset to zero which means"
> -                                    " no heartbeats will be sending");
> +                                    ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN,
> +                                    ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN));
>                  Lex->mi.heartbeat_period= 0.0;
>                }
>                Lex->mi.heartbeat_opt=  LEX_MASTER_INFO::LEX_MI_DISABLE;
> 
> === modified file 'sql/sys_vars.cc'
> --- a/sql/sys_vars.cc	2010-08-30 14:07:40 +0000
> +++ b/sql/sys_vars.cc	2010-09-27 16:34:13 +0000
> @@ -2935,11 +2935,8 @@ static bool fix_slave_net_timeout(sys_va
>                       (active_mi? active_mi->heartbeat_period : 0.0)));
>    if (active_mi && slave_net_timeout < active_mi->heartbeat_period)
>      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> -                        ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> -                        "The current value for master_heartbeat_period"
> -                        " exceeds the new value of `slave_net_timeout' sec."
> -                        " A sensible value for the period should be"
> -                        " less than the timeout.");
> +                        ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX,
> +                        ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX));
>    mysql_mutex_unlock(&LOCK_active_mi);
>    return false;
>  }
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 

Thread
bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204) Bug#54144Luis Soares27 Sep
  • Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)Bug#54144Sven Sandberg28 Sep
    • Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)Bug#54144Luís Soares28 Sep
      • Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)Bug#54144Luís Soares7 Oct
Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)Bug#54144Luís Soares7 Oct
  • Re: bzr commit into mysql-5.5-bugfixing branch (luis.soares:3204)Bug#54144Luís Soares7 Oct