summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2006-02-09 13:35:59 +0300
committerkonstantin@mysql.com <>2006-02-09 13:35:59 +0300
commite1f807af2686619981b2dba4f63f53e62855b00d (patch)
tree5cb0dfc9bfbaf2c7fe5b62e6e2c4eb3240c19f9a /extra
parent51fda104cca335b9a42d7cd4773741e6410b105b (diff)
parent16edce1e5d6ee0353aa72468ec30060267773963 (diff)
downloadmariadb-git-e1f807af2686619981b2dba4f63f53e62855b00d.tar.gz
Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
Diffstat (limited to 'extra')
-rw-r--r--extra/perror.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/extra/perror.c b/extra/perror.c
index e82ff08ad5d..3b7560837b9 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -239,10 +239,24 @@ int main(int argc,char *argv[])
if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) &&
(ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0))
{
- msg= 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