Bug #30003 perror only shows OS error message when a mysql error code shadows an OS one
Submitted: 24 Jul 2007 10:30 Modified: 7 Oct 2007 5:29
Reporter: Hartmut Holzgraefe Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.0, 5.1 OS:Linux
Assigned to: CPU Architecture:Any
Tags: useability

[24 Jul 2007 10:30] Hartmut Holzgraefe
Description:
When OS error codes overlap with MySQL error codes the perror tool 
in MySQL 4.1 shows the message text for both:

  $ /usr/local/mysql-4.1/bin/perror 121
  OS error code 121:  Remote I/O error
  MySQL error code 121: Duplicate key on write or update

Starting with 5.0 only the OS error code is shown though:

  $ /usr/local/mysql-5.0/bin/perror 121
  OS error code 121:  Remote I/O error

so effectively hiding the fact that this is actually more
likely a MySQL error

How to repeat:
try "perror 121" with perror versions from 4.1 and 5.x

Suggested fix:
revert to old behavior