summaryrefslogtreecommitdiff
path: root/extra/perror.c
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-07-26 14:09:20 +0200
committermsvensson@neptunus.(none) <>2006-07-26 14:09:20 +0200
commit9e000766b7c22c2de7ff58a6c1ae7bb3abb1709c (patch)
tree328d27d08b707854347a0457312e5c1ee8517dbd /extra/perror.c
parentbbf6c985c8979d72ccb314768deb2ed2e71dfa14 (diff)
downloadmariadb-git-9e000766b7c22c2de7ff58a6c1ae7bb3abb1709c.tar.gz
Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
- Since error 1186 is not found among NDB error codes, the message retuned should indicate that.
Diffstat (limited to 'extra/perror.c')
-rw-r--r--extra/perror.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/extra/perror.c b/extra/perror.c
index 531d30dae86..b26e516a101 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -261,7 +261,7 @@ int main(int argc,char *argv[])
found= 1;
msg= 0;
}
- else
+ else
#endif
msg = strerror(code);
@@ -281,20 +281,23 @@ int main(int argc,char *argv[])
else
puts(msg);
}
- if (!(msg=get_ha_error_msg(code)))
+
+ if (!found)
{
- if (!found)
- {
+ /* Error message still not found, look in handler error codes */
+ if (!(msg=get_ha_error_msg(code)))
+ {
fprintf(stderr,"Illegal error code: %d\n",code);
error=1;
- }
- }
- else
- {
- if (verbose)
- printf("MySQL error code %3d: %s\n",code,msg);
- else
- puts(msg);
+ }
+ else
+ {
+ found= 1;
+ if (verbose)
+ printf("MySQL error code %3d: %s\n",code,msg);
+ else
+ puts(msg);
+ }
}
}
}