summaryrefslogtreecommitdiff
path: root/extra/perror.c
diff options
context:
space:
mode:
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;
}