| Bug #36912 | wrong error messages | ||
|---|---|---|---|
| Submitted: | 23 May 2008 11:36 | Modified: | 28 Jul 2008 21:16 |
| Reporter: | Guilhem Bichot | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
| Version: | 6.0-bk | OS: | Any |
| Assigned to: | Marc ALFF | CPU Architecture: | Any |
[23 May 2008 11:37]
Guilhem Bichot
in my_base.h, we could replace the #define-s by an enum, which automatically increments values (suggestion by Andrey Hristov).
[23 May 2008 12:34]
MySQL Verification Team
Thank you for the bug report.
[28 Jul 2008 21:16]
Marc ALFF
It seems the code has been fixed already. In mysql 6.0.7, File mysys/my_handler_error.h: /* HA_ERR_FOREIGN_DUPLICATE_KEY */ "Upholding foreign key constraints would lead to a duplicate key error in " "some other table", File include/my_base.h: #define HA_ERR_CORRUPT_EVENT 172 #define HA_ERR_NEW_FILE 173 /* New file format */ Closing as can't repeat.

Description: I didn't check older versions. Two problems: mysys/my_handler_errors.h: /* HA_ERR_FOREIGN_DUPLICATE_KEY */ "Upholding foreign key constraints would lead to a duplicate key error in " /* HA_ERR_TABLE_NEEDS_UPGRADE */ "Table needs to be upgraded before it can be used", see, a comma is missing at the end of the second line, which leads to a concatenation with the fourth line. In fact, it's probably a merge problem, because in 5.1: "Upholding foreign key constraints would lead to a duplicate key error in " "some other table", i.e. "some other table", was lost in the merge. This went unnoticed because of this second problem in include/my_base.h: #define HA_ERR_CORRUPT_EVENT 172 /* The event was corrupt, leading to illegal data being read */ #define HA_ERR_NEW_FILE 172 /* New file format */ see: two codes which are equal. How to repeat: just look at code. Wrong error message will be displayed. Suggested fix: Fix code.