Bug #17235 perror prints wrong prefix for ndb error codes

This commit is contained in:
tomas@poseidon.ndb.mysql.com 2006-02-08 17:17:27 +01:00
parent 8d1e578cef
commit 16edce1e5d

View File

@ -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