mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Post-merge fixes.
This commit is contained in:
@@ -32,18 +32,18 @@ create function func1() returns int
|
||||
return 42|
|
||||
|
||||
# Can't create recursively
|
||||
--error 1273
|
||||
--error 1279
|
||||
create procedure foo()
|
||||
create procedure bar() set @x=3|
|
||||
--error 1273
|
||||
--error 1279
|
||||
create procedure foo()
|
||||
create function bar() returns double return 2.3|
|
||||
|
||||
# Already exists
|
||||
--error 1274
|
||||
--error 1280
|
||||
create procedure proc1()
|
||||
set @x = 42|
|
||||
--error 1274
|
||||
--error 1280
|
||||
create function func1() returns int
|
||||
return 42|
|
||||
|
||||
@@ -51,32 +51,32 @@ drop procedure proc1|
|
||||
drop function func1|
|
||||
|
||||
# Does not exist
|
||||
--error 1275
|
||||
--error 1281
|
||||
alter procedure foo|
|
||||
--error 1275
|
||||
--error 1281
|
||||
alter function foo|
|
||||
--error 1275
|
||||
--error 1281
|
||||
drop procedure foo|
|
||||
--error 1275
|
||||
--error 1281
|
||||
drop function foo|
|
||||
--error 1275
|
||||
--error 1281
|
||||
call foo()|
|
||||
drop procedure if exists foo|
|
||||
|
||||
# LEAVE/ITERATE with no match
|
||||
--error 1278
|
||||
--error 1284
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
leave bar;
|
||||
end loop|
|
||||
--error 1278
|
||||
--error 1284
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
iterate bar;
|
||||
end loop|
|
||||
|
||||
# Redefining label
|
||||
--error 1279
|
||||
--error 1285
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
foo: loop
|
||||
@@ -85,14 +85,14 @@ foo: loop
|
||||
end loop foo|
|
||||
|
||||
# End label mismatch
|
||||
--error 1280
|
||||
--error 1286
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
set @x=2;
|
||||
end loop bar|
|
||||
|
||||
# Referring to undef variable
|
||||
--error 1281
|
||||
--error 1287
|
||||
create procedure foo(out x int)
|
||||
begin
|
||||
declare y int;
|
||||
@@ -106,17 +106,17 @@ begin
|
||||
select name from mysql.proc;
|
||||
select type from mysql.proc;
|
||||
end|
|
||||
--error 1282
|
||||
--error 1288
|
||||
call foo()|
|
||||
drop procedure foo|
|
||||
|
||||
# RETURN in FUNCTION only
|
||||
--error 1283
|
||||
--error 1289
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
||||
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
||||
--error 1284
|
||||
--error 1290
|
||||
create function foo() returns int
|
||||
begin
|
||||
declare x int;
|
||||
@@ -130,19 +130,19 @@ create procedure p(x int)
|
||||
create function f(x int) returns int
|
||||
return x+42|
|
||||
|
||||
--error 1288
|
||||
--error 1294
|
||||
call p()|
|
||||
--error 1288
|
||||
--error 1294
|
||||
call p(1, 2)|
|
||||
--error 1288
|
||||
--error 1294
|
||||
select f()|
|
||||
--error 1288
|
||||
--error 1294
|
||||
select f(1, 2)|
|
||||
|
||||
drop procedure p|
|
||||
drop function f|
|
||||
|
||||
--error 1289
|
||||
--error 1295
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
@@ -156,7 +156,7 @@ begin
|
||||
end if;
|
||||
end|
|
||||
|
||||
--error 1289
|
||||
--error 1295
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
|
||||
Reference in New Issue
Block a user