Bug #10143 Perror not showing error description

Submitted: 25 Apr 2005 12:50 Modified: 6 Mar 2010 18:27
Reporter: [ name withheld ] (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:4.0, 4.1, 5.0 OS:Any (*)
Assigned to: Marc ALFF CPU Architecture:Any
Tags: qc, usability

[25 Apr 2005 12:50] [ name withheld ]
Description:
I got this error back from MySQL:

ERROR 1062 (23000): Duplicate entry '...' for key 1

Perror seems unable to describe this error.

How to repeat:
Try running:

C:\>perror 1062
Illegal error code: 1062

I also tried the following in doubt of which was the right number:

C:\>perror 23000
Illegal error code: 23000
[7 Apr 2006 21:37] Hartmut Holzgraefe
this is a general problem: perror does not know about the error codes >=1000
i find myself using grep ever so often to look them up, it's a real shame that 
perror is not able to help with this rather simple task ... :(
[25 Jan 2007 12:14] Hartmut Holzgraefe
see also bug 25177
[28 Feb 2007 23:33] Chad MILLER
I planned to put all error codes in extras/perror.c and have perror the program dump a stream of C++ "#define"s when given a certain parameter.

Execute it, redirecting to a file that the server uses.

Here's a patch that is 80% done, but needs some dependency problems worked out first.
[28 Feb 2007 23:34] Chad MILLER
Chad's first pass at a solution.  Needs a tiny amount of work.

Attachment: p (application/octet-stream, text), 14.78 KiB.

[30 Jun 2007 0:36] MySQL Verification Team
Still happens:

[miguel@light 5.0]$ bin/perror 1062
Illegal error code: 1062
[9 Oct 2007 16:41] Jeffrey Pugh
Other perror bugs:  bug #23028,#30003, #25177
[5 Aug 2008 23:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/50969

2745 Marc Alff	2008-08-05
      Bug#10143 (Perror not showing error description)
      
      Before this fix, errors described in sql/share/errmsg.txt were not
      displayed by the perror utility.
      
      With this fix, perror now is aware of these errors.
      
      Fixed the code generation for include/mysqld_ername.h to add the error
      message text.
      
      Fixed perror to lookup errors in include/mysqld_ername.h.
      
      Note that since the code is automatically generated,
      any new error created in sql/share/errmsg.txt (the source code)
      will be automatically recognized by perror, preventing the perror utility
      to get out of sync with the main source code.
[6 Aug 2008 12:57] Chad MILLER
Revno 2745 is good with me.  The capitalized "ER" in the function name may bother others, but I think it's okay.
[6 Aug 2008 22:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51046

2748 Marc Alff	2008-08-06
      Bug#10143
      
      Fixed the test result for ndb_basic, which is using perror.
[6 Aug 2008 22:17] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51047

2748 Marc Alff	2008-08-06
      Bug#10143
      
      Fixed the test result for ndb_basic, which is using perror.
[7 Aug 2008 18:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51138

2744 Marc Alff	2008-08-07 [merge]
      Merge mysql-6.0-bugteam -> local bugfix branch
[11 Aug 2008 14:56] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51322

2765 Davi Arnaut	2008-08-11 [merge]
      Merge mysql-6.0-bugteam into mysql-6.0 main.
[12 Aug 2008 14:19] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51420

2765 Davi Arnaut	2008-08-12 [merge]
      Merge mysql-6.0-bugteam into mysql-6.0 main.
[12 Aug 2008 14:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51423

2765 Davi Arnaut	2008-08-12 [merge]
      Merge mysql-6.0-bugteam into mysql-6.0 main.
[12 Aug 2008 14:36] Bugs System
Pushed into 6.0.7-alpha  (revid:marc.alff@sun.com-20080806221607-m7q3g7gm144z9smp) (version source revid:davi.arnaut@sun.com-20080812141852-8e6knbqclpfd8irn) (pib:3)
[12 Aug 2008 16:39] Paul DuBois
Noted in 6.0.7 changelog.

perror did not work for errors described in the sql/share/errmsg.txt
file.
[14 Aug 2008 7:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51602

2684 He Zhenxing	2008-08-14 [merge]
      Merge 6.0 -> 6.0-rpl-testfixes
[14 Aug 2008 7:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51603

2684 He Zhenxing	2008-08-14 [merge]
      Merge 6.0 -> 6.0-rpl-testfixes
[28 Aug 2008 20:14] Bugs System
Pushed into 6.0.7-alpha  (revid:cbell@mysql.com-20080822132131-uveo6wiuecy6m2b8) (version source revid:cbell@mysql.com-20080822132131-uveo6wiuecy6m2b8) (pib:3)
[14 Sep 2008 0:53] Bugs System
Pushed into 6.0.7-alpha  (revid:marc.alff@sun.com-20080806221607-m7q3g7gm144z9smp) (version source revid:vvaintroub@mysql.com-20080804094710-jb2qpqxpf2ir2gf3) (pib:3)
[24 Feb 2010 0:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/101268

2982 Marc Alff	2010-02-23
      Bug#10143 Perror not showing error description
      
      Backport to 5.5.99
[24 Feb 2010 0:54] Marc ALFF
Backport for 5.5.99 queued in mysql-next-mr-bugfixing
[25 Feb 2010 19:46] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100225194420-p60r4u90tszj8q2x) (version source revid:wlad@sun.com-20100224014249-ztsx39z7p85vr0pe) (merge vers: 6.0.14-alpha) (pib:16)
[25 Feb 2010 19:48] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100225194305-h49uyjrlfl3mwo60) (version source revid:wlad@sun.com-20100224012055-l03398ur9fid1bry) (pib:16)
[25 Feb 2010 19:49] Paul DuBois
Setting report to Need Merge pending push of Celosia to release tree.
[6 Mar 2010 11:00] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:alik@sun.com-20100225195857-farb6yvy8x06bylj) (merge vers: 5.5.99-m3) (pib:16)
[6 Mar 2010 18:27] Paul DuBois
Noted in 5.5.3 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.100 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.