Bug #22012 Store procedure: support LEAVE without label
Submitted: 5 Sep 2006 11:32 Modified: 5 Sep 2006 11:57
Reporter: Andre Timmer Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5 OS:
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[5 Sep 2006 11:32] Andre Timmer
Description:
Request to support LEAVE without label.

How to repeat:
Code below is easier to write and read

loop
  ..
  loop
   ..
   leave;
  end loop;
end loop;

then

loop1: loop
  ..
  loop2: loop
   ..
   leave loop2;
  end loop loop2;
end loop loop1;

Suggested fix:
'leave;' should leave the enclosing loop, in this case loop2.
[5 Sep 2006 11:57] Valeriy Kravchuk
Thank you for a reasonable feature request.