mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Various bug fixes:
- Duplicate parameters/variables, conditions and cursors (not allowed). - ITERATE in labelled BEGIN-END (not allowed). - Missing SQLSTATE [VALUE] keywords in CONDITION/HANDLER declaration (added). - Empty BEGIN-END (now allowed). - End label (now optional).
This commit is contained in:
@@ -74,6 +74,11 @@ create procedure foo()
|
||||
foo: loop
|
||||
iterate bar;
|
||||
end loop|
|
||||
--error 1285
|
||||
create procedure foo()
|
||||
foo: begin
|
||||
iterate foo;
|
||||
end|
|
||||
|
||||
# Redefining label
|
||||
--error 1286
|
||||
@@ -298,6 +303,33 @@ end|
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
--error 1307
|
||||
create procedure p(in x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
--error 1307
|
||||
create function p(x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
--error 1307
|
||||
create procedure p()
|
||||
begin
|
||||
declare x float;
|
||||
declare x int;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure p()
|
||||
begin
|
||||
declare c condition for 1064;
|
||||
declare c condition for 1065;
|
||||
end|
|
||||
--error 1307
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from t1;
|
||||
declare c cursor for select field from t1;
|
||||
end|
|
||||
|
||||
drop table t1|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
Reference in New Issue
Block a user