summaryrefslogtreecommitdiff
path: root/extra/perror.c
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-10-03 20:04:44 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2005-10-03 20:04:44 +0200
commitec337c04a63f61f8ea67d0a64b65ac1333caa1b2 (patch)
tree6aa239494637d4dfb2fe46d86ebe29886352ab1d /extra/perror.c
parent814fc33e58554c1c36ca0fa72d5d6c7a7dff5e44 (diff)
downloadmariadb-git-ec337c04a63f61f8ea67d0a64b65ac1333caa1b2.tar.gz
added structured ndbd exit codes
BitKeeper/deleted/.del-ErrorMessages.hpp~9ab815d55a13433a: Delete: ndb/src/kernel/error/ErrorMessages.hpp config/ac-macros/ha_ndbcluster.m4: add ndb mgmapi to ndbcluster_includes extra/perror.c: perror to print also ndbd exit codes ndb/include/Makefile.am: added new ndbd exit code include file to src distribution ndb/include/kernel/signaldata/EventReport.hpp: backported from 5.1, included node id in event report signal ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: backported from 5.1, included node id in event report signal
Diffstat (limited to 'extra/perror.c')
-rw-r--r--extra/perror.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/extra/perror.c b/extra/perror.c
index dedd558e4cf..919088ba42e 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -25,6 +25,7 @@
#include <my_getopt.h>
#ifdef HAVE_NDBCLUSTER_DB
#include "../ndb/src/ndbapi/ndberror.c"
+#include "../ndb/src/kernel/error/ndbd_exit_codes.c"
#endif
static my_bool verbose, print_all_codes;
@@ -235,8 +236,11 @@ int main(int argc,char *argv[])
#ifdef HAVE_NDBCLUSTER_DB
if (ndb_code)
{
- if (ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0)
- msg= 0;
+ if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) &&
+ (ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0))
+ {
+ msg= 0;
+ }
else
msg= ndb_string;
}