Bug #30390 pass up OS and Engine error numbers
Submitted: 13 Aug 2007 15:23
Reporter: Matthew Lord Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: engine errors, errors, os errors

[13 Aug 2007 15:23] Matthew Lord
Description:
There are various OS and engine errors that get passed up through mysqld but there
is no way to get the error number outside of parsing the error message.  The SQLCODE is:

Error: 1296 SQLSTATE: HY000 (ER_GET_ERRMSG)
Message: Got error %d '%s' from %s

The problem is that there's no nice c function to get the lower level error number.

Here's an example:
"Got error code 274 'Time-out in NDB....'"

It would be nice to be able to get 274 from the C API either via mysql_errno or another function.

How to repeat:
N/A

Suggested fix:
N/A