Bug #48637 | ERROR 22012 Division by 0 handled by handler for sqlstate 23000 (ER_DUP_ENTRY) | ||
---|---|---|---|
Submitted: | 9 Nov 2009 13:32 | Modified: | 9 Jun 2014 17:03 |
Reporter: | Szymon Sobczak | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.0.88, 5.1.37 | OS: | Any (Windows, Mac OS X) |
Assigned to: | CPU Architecture: | Any | |
Tags: | error handling, handler |
[9 Nov 2009 13:32]
Szymon Sobczak
[9 Nov 2009 15:59]
Valeriy Kravchuk
Verified just as described also with 5.0.88 on Mac OS X: mysql> CALL A(); +----------------------+ | Duplication handled! | +----------------------+ | Duplication handled! | +----------------------+ 1 row in set (0.00 sec) Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> show warnings\G *************************** 1. row *************************** Level: Error Code: 1365 Message: Division by 0 1 row in set (0.00 sec) mysql> CALL B(); ERROR 1365 (22012): Division by 0 mysql> select version(); +--------------+ | version() | +--------------+ | 5.0.88-debug | +--------------+ 1 row in set (0.00 sec) mysql> select @@sql_mode; +----------------------------------------------+ | @@sql_mode | +----------------------------------------------+ | STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO | +----------------------------------------------+ 1 row in set (0.01 sec)
[9 Jun 2014 17:03]
Paul DuBois
Noted in 5.6.4 changelog. If an error occurred in a context where different handlers were present at different levels of nesting, an outer handler could be chosen rather than the innermost one.