mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Major rehacking and cleanup of sp_pcontext.
This finishes (almost) WL#2002: Implement stored procedure GOTO.
Only the syntax issue for free labels remains ("label L;" vs "L:").
This commit is contained in:
@@ -103,6 +103,42 @@ create procedure foo()
|
||||
begin
|
||||
goto foo;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure foo()
|
||||
begin
|
||||
begin
|
||||
label foo;
|
||||
end;
|
||||
goto foo;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure foo()
|
||||
begin
|
||||
goto foo;
|
||||
begin
|
||||
label foo;
|
||||
end;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure foo()
|
||||
begin
|
||||
begin
|
||||
goto foo;
|
||||
end;
|
||||
begin
|
||||
label foo;
|
||||
end;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure foo()
|
||||
begin
|
||||
begin
|
||||
label foo;
|
||||
end;
|
||||
begin
|
||||
goto foo;
|
||||
end;
|
||||
end|
|
||||
|
||||
# Redefining label
|
||||
--error 1308
|
||||
@@ -380,6 +416,18 @@ begin
|
||||
declare c cursor for select * from t1;
|
||||
end|
|
||||
|
||||
--error 1357
|
||||
create procedure p()
|
||||
begin
|
||||
declare continue handler for sqlexception
|
||||
begin
|
||||
goto L1;
|
||||
end;
|
||||
|
||||
select field from t1;
|
||||
label L1;
|
||||
end|
|
||||
|
||||
#
|
||||
# BUG#1965
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user