MySQL Forums
Forum List  »  Stored Procedures

Re: Problems using LOOP..END LOOP, label and LEAVE
Posted by: Roland Bouman
Date: July 01, 2005 04:17AM

Alas, I can't get it working. I tried it in the query browser and in the command line utility. The last thing i tried was:

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

mysql> select version()#
+---------------+
| version() |
+---------------+
| 5.0.7-beta-nt |
+---------------+
1 row in set (0.03 sec)

mysql> create procedure myproc()
-> begin
-> myLoop: loop
-> leave myLoop;
-> end loop;
-> end;#
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'myLoo
p: loop
leave myLoop;
end loop;
end' at line 2
mysql>

Is there anyone who can get this working?
To me, it seems related to bug# 11361, (Ross Rankin)

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.