Bug #44852 scope_ of "Declare Condition XYZ" should be session wide
Submitted: 13 May 2009 19:37 Modified: 13 May 2009 21:06
Reporter: Dewey Gaedcke Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: condition, DECLARE, handler

[13 May 2009 19:37] Dewey Gaedcke
Description:
It would seem that the _scope_ of "Declare Condition XYZ" should be session wide, not just within the Begin--End; block

It does little to improve readability of code or error handling sanity to re-declare these condition names all over the place.

if that is already possible, it should be clarified in the documentation

How to repeat:
It does little to improve readability of code or error handling sanity to re-declare these condition names all over the place.

if that is already possible, it should be clarified in the documentation

Suggested fix:
It would seem that the _scope_ of "Declare Condition XYZ" should be session wide, not just within the Begin--End; block

It does little to improve readability of code or error handling sanity to re-declare these condition names all over the place.

if that is already possible, it should be clarified in the documentation
[13 May 2009 21:06] Sveta Smirnova
Thank you for the report.

I believe you want same functionality as user-defined variables already have. See http://dev.mysql.com/doc/refman/4.1/en/user-variables.html for details.