MySQL Forums
Forum List  »  Stored Procedures

Re: Loop Label / Leave
Posted by: Peter Gulutzan
Date: June 15, 2005 10:49AM

I haven't heard of a problem with labels. I just tested with MySQL 5.0.8, they work as advertised:

mysql> CREATE PROCEDURE p20 () DETERMINISTIC BEGIN DECLARE v INT DEFAULT 0; cur_loop: LOOP IF v <> 0 THEN ITERATE cur_loop;END IF; LEAVE cur_loop; END LOOP cur_loop; END//
Query OK, 0 rows affected (0.01 sec)

mysql> call p20()//
Query OK, 0 rows affected (0.00 sec)

If you encounter a bug, please report it to bugs.mysql.com.

Options: ReplyQuote


Subject
Views
Written By
Posted
8902
June 14, 2005 02:37PM
3275
June 14, 2005 03:39PM
2756
June 14, 2005 04:56PM
2925
June 15, 2005 01:43AM
Re: Loop Label / Leave
2775
June 15, 2005 10:49AM
2522
June 15, 2005 01:39PM
2220
June 15, 2005 02:05PM
2298
June 15, 2005 02:18PM
2407
June 15, 2005 02:29PM
2627
June 15, 2005 04:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.