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

The changes looks good. OK to push.

Olav

On 07/06/2011 10:10, Guilhem Bichot wrote:
> #At file:///home/mysql_src/bzrrepos_new/wl5914_trunk/ based on
> revid:guilhem.bichot@stripped
>
>   3163 Guilhem Bichot	2011-06-07
>        This patch is for trunk.
>        WL#5914 remove option "--all" and BDB errors from the "perror" program.
>        This removes printing of BDB errors, and compiler warnings about sys_nerr*.
>        HAVE_SYS_ERRLIST is now unneeded.
>
>      modified:
>        cmake/os/WindowsCache.cmake
>        config.h.cmake
>        configure.cmake
>        extra/perror.c
> === modified file 'cmake/os/WindowsCache.cmake'
> --- a/cmake/os/WindowsCache.cmake	2011-05-26 15:20:09 +0000
> +++ b/cmake/os/WindowsCache.cmake	2011-06-07 08:09:59 +0000
> @@ -1,4 +1,4 @@
> -# Copyright (C) 2010 Sun Microsystems, Inc
> +# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
>   #
>   # This program is free software; you can redistribute it and/or modify
>   # it under the terms of the GNU General Public License as published by
> @@ -266,7 +266,6 @@ SET(HAVE_SYNCH_H CACHE  INTERNAL "")
>   SET(HAVE_SYSENT_H CACHE  INTERNAL "")
>   SET(HAVE_SYS_CDEFS_H CACHE  INTERNAL "")
>   SET(HAVE_SYS_DIR_H CACHE  INTERNAL "")
> -SET(HAVE_SYS_ERRLIST CACHE  INTERNAL "")
>   SET(HAVE_SYS_FILE_H CACHE  INTERNAL "")
>   SET(HAVE_SYS_FPU_H CACHE  INTERNAL "")
>   SET(HAVE_SYS_IOCTL_H CACHE  INTERNAL "")
>
> === modified file 'config.h.cmake'
> --- a/config.h.cmake	2011-05-26 15:20:09 +0000
> +++ b/config.h.cmake	2011-06-07 08:09:59 +0000
> @@ -287,7 +287,6 @@
>   #cmakedefine HAVE_TZNAME 1
>   #cmakedefine HAVE_AIO_READ 1
>   /* Symbols we may use */
> -#cmakedefine HAVE_SYS_ERRLIST 1
>   /* used by stacktrace functions */
>   #cmakedefine HAVE_BSS_START 1
>   #cmakedefine HAVE_BACKTRACE 1
>
> === modified file 'configure.cmake'
> --- a/configure.cmake	2011-06-06 10:29:45 +0000
> +++ b/configure.cmake	2011-06-07 08:09:59 +0000
> @@ -477,7 +477,6 @@ CHECK_FUNCTION_EXISTS(rdtscll HAVE_RDTSC
>   # Tests for symbols
>   #
>
> -CHECK_SYMBOL_EXISTS(sys_errlist "stdio.h" HAVE_SYS_ERRLIST)
>   CHECK_SYMBOL_EXISTS(madvise "sys/mman.h" HAVE_DECL_MADVISE)
>   CHECK_SYMBOL_EXISTS(tzname "time.h" HAVE_TZNAME)
>   CHECK_SYMBOL_EXISTS(lrand48 "stdlib.h" HAVE_LRAND48)
>
> === modified file 'extra/perror.c'
> --- a/extra/perror.c	2011-03-29 12:43:49 +0000
> +++ b/extra/perror.c	2011-06-07 08:09:59 +0000
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2000 MySQL AB
> +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
>
>      This program is free software; you can redistribute it and/or modify
>      it under the terms of the GNU General Public License as published by
> @@ -11,7 +11,7 @@
>
>      You should have received a copy of the GNU General Public License
>      along with this program; if not, write to the Free Software
> -   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
> +   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
>
>   /* Return error-text for system error messages and handler messages */
>
> @@ -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,
> @@ -78,30 +73,6 @@ static struct my_option my_long_options[
>   };
>
>
> -typedef struct ha_errors {
> -  int errcode;
> -  const char *msg;
> -} HA_ERRORS;
> -
> -
> -static HA_ERRORS ha_errlist[]=
> -{
> -  { -30999, "DB_INCOMPLETE: Sync didn't finish"},
> -  { -30998, "DB_KEYEMPTY: Key/data deleted or never created"},
> -  { -30997, "DB_KEYEXIST: The key/data pair already exists"},
> -  { -30996, "DB_LOCK_DEADLOCK: Deadlock"},
> -  { -30995, "DB_LOCK_NOTGRANTED: Lock unavailable"},
> -  { -30994, "DB_NOSERVER: Server panic return"},
> -  { -30993, "DB_NOSERVER_HOME: Bad home sent to server"},
> -  { -30992, "DB_NOSERVER_ID: Bad ID sent to server"},
> -  { -30991, "DB_NOTFOUND: Key/data pair not found (EOF)"},
> -  { -30990, "DB_OLD_VERSION: Out-of-date version"},
> -  { -30989, "DB_RUNRECOVERY: Panic return"},
> -  { -30988, "DB_VERIFY_BAD: Verify failed; bad format"},
> -  { 0,NullS },
> -};
> -
> -
>   static void print_version(void)
>   {
>     printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
> @@ -150,7 +121,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;
> @@ -161,8 +132,6 @@ static int get_options(int *argc,char **
>
>   static const char *get_ha_error_msg(int code)
>   {
> -  HA_ERRORS *ha_err_ptr;
> -
>     /*
>       If you got compilation error here about compile_time_assert array, check
>       that every HA_ERR_xxx constant has a corresponding error message in
> @@ -174,9 +143,6 @@ static const char *get_ha_error_msg(int
>     if (code>= HA_ERR_FIRST&&  code<= HA_ERR_LAST)
>       return handler_error_messages[code - HA_ERR_FIRST];
>
> -  for (ha_err_ptr=ha_errlist ; ha_err_ptr->errcode ;ha_err_ptr++)
> -    if (ha_err_ptr->errcode == code)
> -      return ha_err_ptr->msg;
>     return NullS;
>   }
>
> @@ -291,22 +257,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
>
>
>
>


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