Ann,
I'm 100% in agreement with all of your points. There's just a bunch of
stuff to do in order to even get there :)
Your idea about plugin designers allocating a range of error codes is
wonderful (and very similar to the way, say, port numbers are assigned
by the IANA). But, that requires some organizational/procedural efforts.
Those efforts would have to be done across all versions/forks of MySQL
to be truly effective for all users.
I believe those efforts would be *much* easier of the Drizzle community
can show a prototype design for how to handle errors, especially in the
plugin space...
We could also see if following the SQLSTATE model is worth looking into.
Cheers!
Jay
Ann W. Harrison wrote:
Jay Pipes wrote:
Jim Starkey wrote:
Would it make sense to rethink error messages, codes, and all that?
It would be really nice if:
1. Error codes were stable across releases (and forks!)
Perhaps, though I don't view this as much of a priority...there could
always be a translation piece if needed.
How would a "translation piece" work? I'm writing an app that uses
Drizzle and I want to catch specific errors and handle them as well as
possible (e.g. "bad value, try again" vs. "data conflict, rollback
the transaction and retry", vs. "all hell has broken loose, head for
the hills")
In version 1, a deadlock error is say, 25. In version 2, it's 97.08.
Who does the translation and where? Assuming we know enough to do the
translation, why not implement the translated part from the beginning
and save a step?
2. Error codes from the server, engines, and plugins were mutually
exclusive
+10
The current design is pretty bad in this regard. There should be some
range of valid values for plugin-specific errors.
3. A client program could decompose an error code to determine its
source (server, engine, or plugin)
See above, agreed. Though, in Drizzle-land, an engine is always a
plugin; so I would just say "kernel error" and "plugin error".
So you don't want plugins stepping on kernel error codes, but if they
step on each other, that's OK? Why not allow plugin designers to
allocate a range of values to a specific plugin. Yes, there may be
rogues, but at least those who are willing to register can be sure
they won't step on each others values.
Cheers,
Ann
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp