MySQL Forums
Forum List  »  Stored Procedures

Re: Problems using LOOP..END LOOP, label and LEAVE
Posted by: Andrew Gilfrin
Date: July 01, 2005 06:29AM

Yes sorry it 5.0.7 not 5.7,

I just tried your example verbatum....

mysql> create procedure myproc()
-> begin
-> myloop: loop
-> leave myloop;
-> end loop;
-> end;#
Query OK, 0 rows affected (0.00 sec)

So it seems that works. I even tried setting the same sql_mode parameters....

mysql> select @@sql_mode//
+-------------------------------------------------------------+
| @@sql_mode |
+-------------------------------------------------------------+
| REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI |
+-------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> drop procedure myproc;
-> //
Query OK, 0 rows affected (0.00 sec)

mysql> create procedure myproc()
-> begin
-> myloop: loop
-> leave myloop;
-> end loop;
-> end;
-> //
Query OK, 0 rows affected (0.00 sec)

So not sure what it can be.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote




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.