-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLState #207
Comments
It's left out because we want to keep allocations to a minimum. Do you still want to use that code given MySQLs excessive mapping to HY000? If not, please close this. If you do, we'll have to discuss it. |
As Arne said, we want to keep the memory footprint small. |
Thanks for the feedback. Despite the significantly lower granularity of SQLSTATE, I was hoping to use it to classify broad classes of errors (such as duplicate keys) across different rdbmses - but the drivers would need to report the SQLSTATE otherwise this wouldn't be possible - so I was just canvassing reactions really. The other idea I had was that this driver could provide symbols for comparing the MySQL error codes. It shouldn't be too hard to do this, http://bazaar.launchpad.net/~mysql/mysql-server/5.7/view/head:/sql/share/errmsg-utf8.txt looks easily parseable. Thoughts? I'm not sure if its idiomatic for a driver to provide this, but it would be convenient. |
The errmsg files are release-specific and change not infrequently. I think |
Spaaaaarta! Sorry, couldn't resist, will let myself out... |
... and on a more serious note: I wouldn't use the messages and I don't want that in the driver directly. |
You can already do that with the
|
@xaprb Yes, but you can't do it in a program without starting a subprocess. I think that's a bit much if you only want a way to make errors more comparable between different kinds of databases in an ORM solution which @alexzorin wants to do. |
As I'm rereading this, it's a duplicate of #202 |
Hi,
Was there a particular reason that the SQLState code is not being used as part of
MySQLError
? It is currently in the codebase but commented out:Would you be interested in a PR for this? I'd like to use this code if possible instead of MySQL's own error code.
The text was updated successfully, but these errors were encountered: