Bug #51988 MySqlErrorCode enumeration incomplete
Submitted: 12 Mar 2010 12:29 Modified: 30 Mar 2011 21:50
Reporter: John Bayly (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:trunk OS:Windows (All)
Assigned to: Reggie Burnett CPU Architecture:Any

[12 Mar 2010 12:29] John Bayly
Description:
The MySql.Data.MySqlClient.MySqlErrorCode only contains a limited number of values.

From the MySQL server source (mysqld_error.h), I've create a complete enumeration containg all the errors. I've attempted where possible to improve the readability of the values (ie. ER_SP_WRONG_NO_OF_ARGS -> StoredProcedureNumberOfArguments).

I've also added XML comments to the first 140 odd values, and hope to comment the remainder at a later stage.

Finally, where the names I created from mysqld_error.h do not match the existing enum values, I've left the original values, but marked them as obsolete. My reasoning for this is that I've made every effort to maintain consistency with the naming (and relation to the original names), and I feel that the existing values do not have this consistency.

How to repeat:
n/a

Suggested fix:
Diff file included.
[12 Mar 2010 12:34] John Bayly
Diff containing updates to the MySqlErrorCode enumeration

Attachment: MySqlError.cs.diff (application/octet-stream, text), 89.60 KiB.

[7 Apr 2010 7:44] Tonci Grgin
Hi John and thanks for your report.

Verified as described.
[19 Apr 2010 20:10] 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/106049

804 Reggie Burnett	2010-04-19
      - flushed out many more entires in error code enum (bug #51988)