UPDATE 2013-08-30: I fixed 2 bugs and create a GitHub repo called sql_diagnostix. Sorry for not doing this before. If I (or someone else) find new bugs, I’ll update the repo.
To quickly see information about the errors and warnings generated by the last executed statement, we can use
SHOW WARNINGS. However this statement’s results cannot be accessed via SQL, so they cannot be used for error handling within a stored program.
For that purpose we can use
GET DIAGNOSTICS, which has two problems:
- It requires a lot of code
- There is not a