Bug #7299 | Stored procedures: exception handler catches not-found conditions | ||
---|---|---|---|
Submitted: | 14 Dec 2004 21:55 | Modified: | 12 Apr 2005 9:55 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.3-alpha-debug | OS: | Linux (SUSE 9.2) |
Assigned to: | Per-Erik Martin | CPU Architecture: | Any |
[14 Dec 2004 21:55]
Peter Gulutzan
[14 Dec 2004 22:47]
MySQL Verification Team
Thank you for the bug report.
[17 Dec 2004 1:54]
Peter Gulutzan
The exception handler also catches "note" conditions. A "note" is so trivial that I'm not even sure an SQLWARNING should catch it. Certainly an SQLEXCEPTION shouldn't catch it. Example: mysql> DROP TABLE IF EXISTS t// Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> CREATE PROCEDURE h () -> BEGIN -> DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'exit'; -> DROP TABLE IF EXISTS t; -> select 'drop succeeded'; -> END;// Query OK, 0 rows affected (0.00 sec) mysql> call h()// +------+ | exit | +------+ | exit | +------+ 1 row in set (0.00 sec)
[8 Apr 2005 14:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/23806