[Commits] bzr commit into Mariadb 5.2 (monty:2851)

Sergei Golubchik serg at askmonty.org
Sun Sep 26 15:39:13 EEST 2010


Hi, Michael!

On Sep 23, Michael Widenius wrote:
>  2851 Michael Widenius	2010-09-24
>       Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
>       Fix some bugs where we stored values other than 0 or 1 in my_bool
>       Fixed some compiler warnings

It's all ok.
The only comment - I'd change a couple of my_bool to bool below:

> === modified file 'client/mysqladmin.cc'
> --- client/mysqladmin.cc      2010-08-02 09:01:24 +0000
> +++ client/mysqladmin.cc      2010-09-16 05:08:45 +0000
> @@ -1375,7 +1375,7 @@ static my_bool wait_pidfile(char *pidfil
>                           struct stat *pidfile_status)
>  {
>    char buff[FN_REFLEN];
> -  int error= 1;
> +  my_bool error= 1;

you could've changed wait_pidfile to return bool instead.
it's c++ file.

>    uint count= 0;
>    DBUG_ENTER("wait_pidfile");
>  
> === modified file 'client/mysqltest.cc'
> --- client/mysqltest.cc       2010-09-15 12:48:15 +0000
> +++ client/mysqltest.cc       2010-09-16 05:22:39 +0000
> @@ -4732,7 +4732,7 @@ char *get_string(char **to_ptr, char **f
>  }
>  
>  
> -void set_reconnect(MYSQL* mysql, int val)
> +void set_reconnect(MYSQL* mysql, my_bool val)

same here. I'd use bool.

>  {
>    my_bool reconnect= val;
>    DBUG_ENTER("set_reconnect");

Regards,
Sergei


More information about the commits mailing list