List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:June 6 2011 12:33pm
Subject:bzr commit into mysql-trunk branch (guilhem.bichot:3158) WL#5914
View as plain text  
#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*.

    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
   {"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


Attachment: [text/bzr-bundle] bzr/guilhem.bichot@oracle.com-20110606123311-qu7we30pdp7s1798.bundle
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