List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:June 6 2011 8:15pm
Subject:Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914
View as plain text  
Hi Guilhem,

The patch looks good. I have only some minor comments that you should be 
free to ignore.

OK to push.


On 06/06/2011 02:33 PM, Guilhem Bichot wrote:
> #At file:///home/mysql_src/bzrrepos_new/wl5914_trunk/ based on
> revid:guilhem.bichot@stripped
>
>   3158 Guilhem Bichot	2011-06-06
>        This patch is for trunk.
>        WL#5914 remove option "--all" of the "perror" program.
>        This removes printing of BDB errors, a compiler warnings about sys_nerr*.

This commit message says that you remove printing of BDB errors. These 
are still available in the patch. No harm to still have them in perror, 
but since we no longer support BDB it could be an opportunity to remove 
a few more lines of code by removing them completely? (up to you).

>      modified:
>        extra/perror.c
> === modified file 'extra/perror.c'
> --- a/extra/perror.c	2011-03-29 12:43:49 +0000
> +++ b/extra/perror.c	2011-06-06 12:33:11 +0000
> @@ -28,7 +28,7 @@
>   #include "../storage/ndb/include/mgmapi/mgmapi_error.h"
>   #endif
>
> -static my_bool verbose, print_all_codes;
> +static my_bool verbose;
>
>   #include "../include/my_base.h"
>   #include "../mysys/my_handler_errors.h"
> @@ -63,11 +63,6 @@ static struct my_option my_long_options[
>     {"ndb", 257, "Ndbcluster storage engine specific error codes.",&ndb_code,
>      &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
>   #endif
> -#ifdef HAVE_SYS_ERRLIST
> -  {"all", 'a', "Print all the error messages and the number.",
> -&print_all_codes,&print_all_codes, 0, GET_BOOL, NO_ARG,
> -   0, 0, 0, 0, 0, 0},
> -#endif

It seems like perror.c is the only source file that uses 
HAVE_SYS_ERRLIST so maybe we should remove the check for support for 
this from our Cmake files?


>     {"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
>      0, 0, 0, 0, 0, 0},
>     {"verbose", 'v', "Print error code and message (default).",&verbose,
> @@ -150,7 +145,7 @@ static int get_options(int *argc,char **
>     if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
>       exit(ho_error);
>
> -  if (!*argc&&  !print_all_codes)
> +  if (!*argc)
>     {
>       usage();
>       return 1;
> @@ -291,22 +286,6 @@ int main(int argc,char *argv[])
>     my_handler_error_register();
>
>     error=0;
> -#ifdef HAVE_SYS_ERRLIST
> -  if (print_all_codes)
> -  {
> -    HA_ERRORS *ha_err_ptr;
> -    for (code=1 ; code<  sys_nerr ; code++)
> -    {
> -      if (sys_errlist[code]&&  sys_errlist[code][0])
> -      {						/* Skip if no error-text */
> -	printf("%3d = %s\n",code,sys_errlist[code]);
> -      }
> -    }
> -    for (ha_err_ptr=ha_errlist ; ha_err_ptr->errcode ;ha_err_ptr++)
> -      printf("%3d = %s\n",ha_err_ptr->errcode,ha_err_ptr->msg);
> -  }
> -  else
> -#endif
>     {
>       /*
>         On some system, like Linux, strerror(unknown_error) returns a
>

Olav

>
>


Thread
bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Guilhem Bichot6 Jun
  • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Olav Sandstaa7 Jun
    • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Guilhem Bichot7 Jun
  • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Davi Arnaut7 Jun
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Davi Arnaut7 Jun
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914Guilhem Bichot7 Jun