summaryrefslogtreecommitdiff
path: root/extra/perror.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-08-21 18:11:46 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-11 18:53:06 +0200
commit7f5e51b940d65cf541403a50af74163b9aed5cb8 (patch)
treee540d3cd4d678cd276a9d496490ac5e527f30a78 /extra/perror.c
parent57dd1f6f3fcbc7a46e1b3e71257987315f7aa687 (diff)
downloadmariadb-git-7f5e51b940d65cf541403a50af74163b9aed5cb8.tar.gz
MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignore
Diffstat (limited to 'extra/perror.c')
-rw-r--r--extra/perror.c58
1 files changed, 1 insertions, 57 deletions
diff --git a/extra/perror.c b/extra/perror.c
index 8aa6aa35b08..11a703c8666 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -23,11 +23,6 @@
#include <m_string.h>
#include <errno.h>
#include <my_getopt.h>
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
-#include "../storage/ndb/src/ndbapi/ndberror.c"
-#include "../storage/ndb/src/kernel/error/ndbd_exit_codes.c"
-#include "../storage/ndb/include/mgmapi/mgmapi_error.h"
-#endif
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
static my_bool verbose, print_all_codes;
@@ -35,35 +30,12 @@ static my_bool verbose, print_all_codes;
#include <my_base.h>
#include <my_handler_errors.h>
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
-static my_bool ndb_code;
-static char ndb_string[1024];
-int mgmapi_error_string(int err_no, char *str, int size)
-{
- int i;
- for (i= 0; i < ndb_mgm_noOfErrorMsgs; i++)
- {
- if ((int)ndb_mgm_error_msgs[i].code == err_no)
- {
- my_snprintf(str, size-1, "%s", ndb_mgm_error_msgs[i].msg);
- str[size-1]= '\0';
- return 0;
- }
- }
- return -1;
-}
-#endif
-
static struct my_option my_long_options[] =
{
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
- {"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. Deprecated,"
" will be removed in a future release.",
@@ -334,35 +306,7 @@ int main(int argc,char *argv[])
found=0;
code=atoi(*argv);
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
- if (ndb_code)
- {
- if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) &&
- (ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0) &&
- (mgmapi_error_string(code, ndb_string, sizeof(ndb_string)) < 0))
- {
- msg= 0;
- }
- else
- msg= ndb_string;
- if (msg)
- {
- if (verbose)
- printf("NDB error code %3d: %s\n",code,msg);
- else
- puts(msg);
- }
- else
- {
- fprintf(stderr,"Illegal ndb error code: %d\n",code);
- error= 1;
- }
- found= 1;
- msg= 0;
- }
- else
-#endif
- msg = strerror(code);
+ msg = strerror(code);
/*
We don't print the OS error message if it is the same as the