Bug #16371 | HOW TO GET SQLSTATE | ||
---|---|---|---|
Submitted: | 11 Jan 2006 12:32 | Modified: | 4 Oct 2008 18:11 |
Reporter: | lucols lucols | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S4 (Feature request) |
Version: | 5.0 | OS: | Any (all) |
Assigned to: | CPU Architecture: | Any |
[11 Jan 2006 12:32]
lucols lucols
[11 Jan 2006 12:47]
Valeriy Kravchuk
Thank you for a problem report. Yes, something similar to Oracle's SQLCODE and SQLERRM functions will be useful for handlers. But I do not think it is a serious bug - as a workaround, you may also declare several specific handlers for different SQLSTATEs you expect, and the default one for all others. One "universal" handler that logs everything is not so good idea, anyway. So, I mark this report a verified and reasonable feature request.
[12 Jan 2006 8:07]
lucols lucols
thanks for you repeat,.Kravchuk . But realy no any way to get the errorCode in procedure ? If use like the 'CASE statement' to catch error, I dont think it is a good way Becaus when you debug the procedure , you could't know what would be happen . Popularly, error happen, i want to log the error code and message , then rollback the transaction , otherwise, I realy did not know what's the error. Any body has met the problem and have the good way to deal with it, tell me please.
[7 Sep 2006 13:54]
Valeriy Kravchuk
Duplicate of bug #11660. Work on that bug is already started, according to PeterG.
[12 Aug 2009 20:54]
Rajeev Ranjan
Are we able to get the details of Error? Any solution for this bug so far? Thanks Rajeev R