Bug #64424 SHOW ERRORS returns empty resultset in stored procedure
Submitted: 22 Feb 2012 16:19 Modified: 22 Feb 2012 19:13
Reporter: William Chiquito Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0, 5.1 OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: show errors, stored procedure

[22 Feb 2012 16:19] William Chiquito
Description:
SHOW ERRORS returns empty resultset with a declare handler.

How to repeat:
DELIMITER $$

DROP PROCEDURE IF EXISTS `sp_no_show_errors`$$

CREATE PROCEDURE `sp_no_show_errors`()
BEGIN
	declare continue handler for sqlexception show errors;
	select null from no_table;
END$$

DELIMITER ;
[22 Feb 2012 17:31] Sveta Smirnova
Thank you for the report.

This fixed in version 5.5. Please upgrade.
[22 Feb 2012 17:47] William Chiquito
That's right, in MySQL 5.5 there is no problem, so I mentioned 5.0 and 5.1.

This mean that errors in versions of MySQL lower than 5.5 will not be solved? I say not to continue reporting bugs in versions lower than 5.5.

Thank you.
[22 Feb 2012 18:17] Sveta Smirnova
Thank you for the feedback.

This is not 100% true. For 5.0 and 5.1 we currently only solve critical bugs which can lead to security issues, crashes and so on. This bug is surely not of this kind. Also this problem solved due to fix of bug #23032, decision in which version to fix it, were made.
[22 Feb 2012 19:13] William Chiquito
I fully understand the type of errors who will be solving for MySQL versions below 5.5, however, should document the difference in behavior:

*** 5.0.95/5.1.61 ***

CALL sp_no_show_errors;

Result:

Level     Code  Message  
------  ------  ---------

*** 5.5.21 ***

CALL sp_no_show_errors;

Result:

Level     Code  Message  
------  ------  ---------
Error	  1146	'test.no_table' doesn't exist