mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Post-merge fixes.
This commit is contained in:
@ -35,7 +35,7 @@ call foo();
|
|||||||
ERROR 42000: PROCEDURE foo does not exist
|
ERROR 42000: PROCEDURE foo does not exist
|
||||||
drop procedure if exists foo;
|
drop procedure if exists foo;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1287 PROCEDURE foo does not exist
|
Warning 1288 PROCEDURE foo does not exist
|
||||||
show create procedure foo;
|
show create procedure foo;
|
||||||
ERROR 42000: PROCEDURE foo does not exist
|
ERROR 42000: PROCEDURE foo does not exist
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
@ -71,7 +71,7 @@ declare y int;
|
|||||||
set x = y;
|
set x = y;
|
||||||
end;
|
end;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1293 Referring to uninitialized variable y
|
Warning 1294 Referring to uninitialized variable y
|
||||||
drop procedure foo;
|
drop procedure foo;
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
begin
|
begin
|
||||||
|
@ -360,7 +360,7 @@ set sql_log_bin=1;
|
|||||||
set sql_log_off=1;
|
set sql_log_off=1;
|
||||||
set sql_log_update=1;
|
set sql_log_update=1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1297 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
|
Note 1298 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
|
||||||
set sql_low_priority_updates=1;
|
set sql_low_priority_updates=1;
|
||||||
set sql_max_join_size=200;
|
set sql_max_join_size=200;
|
||||||
select @@sql_max_join_size,@@max_join_size;
|
select @@sql_max_join_size,@@max_join_size;
|
||||||
|
@ -32,18 +32,18 @@ create function func1() returns int
|
|||||||
return 42|
|
return 42|
|
||||||
|
|
||||||
# Can't create recursively
|
# Can't create recursively
|
||||||
--error 1285
|
--error 1286
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
create procedure bar() set @x=3|
|
create procedure bar() set @x=3|
|
||||||
--error 1285
|
--error 1286
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
create function bar() returns double return 2.3|
|
create function bar() returns double return 2.3|
|
||||||
|
|
||||||
# Already exists
|
# Already exists
|
||||||
--error 1286
|
--error 1287
|
||||||
create procedure proc1()
|
create procedure proc1()
|
||||||
set @x = 42|
|
set @x = 42|
|
||||||
--error 1286
|
--error 1287
|
||||||
create function func1() returns int
|
create function func1() returns int
|
||||||
return 42|
|
return 42|
|
||||||
|
|
||||||
@ -51,39 +51,39 @@ drop procedure proc1|
|
|||||||
drop function func1|
|
drop function func1|
|
||||||
|
|
||||||
# Does not exist
|
# Does not exist
|
||||||
--error 1287
|
--error 1288
|
||||||
alter procedure foo|
|
alter procedure foo|
|
||||||
--error 1287
|
--error 1288
|
||||||
alter function foo|
|
alter function foo|
|
||||||
--error 1287
|
--error 1288
|
||||||
drop procedure foo|
|
drop procedure foo|
|
||||||
--error 1287
|
--error 1288
|
||||||
drop function foo|
|
drop function foo|
|
||||||
--error 1287
|
--error 1288
|
||||||
call foo()|
|
call foo()|
|
||||||
drop procedure if exists foo|
|
drop procedure if exists foo|
|
||||||
--error 1287
|
--error 1288
|
||||||
show create procedure foo|
|
show create procedure foo|
|
||||||
|
|
||||||
# LEAVE/ITERATE with no match
|
# LEAVE/ITERATE with no match
|
||||||
--error 1290
|
--error 1291
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
foo: loop
|
foo: loop
|
||||||
leave bar;
|
leave bar;
|
||||||
end loop|
|
end loop|
|
||||||
--error 1290
|
--error 1291
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
foo: loop
|
foo: loop
|
||||||
iterate bar;
|
iterate bar;
|
||||||
end loop|
|
end loop|
|
||||||
--error 1290
|
--error 1291
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
foo: begin
|
foo: begin
|
||||||
iterate foo;
|
iterate foo;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
# Redefining label
|
# Redefining label
|
||||||
--error 1291
|
--error 1292
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
foo: loop
|
foo: loop
|
||||||
foo: loop
|
foo: loop
|
||||||
@ -92,7 +92,7 @@ foo: loop
|
|||||||
end loop foo|
|
end loop foo|
|
||||||
|
|
||||||
# End label mismatch
|
# End label mismatch
|
||||||
--error 1292
|
--error 1293
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
foo: loop
|
foo: loop
|
||||||
set @x=2;
|
set @x=2;
|
||||||
@ -113,17 +113,17 @@ begin
|
|||||||
select name from mysql.proc;
|
select name from mysql.proc;
|
||||||
select type from mysql.proc;
|
select type from mysql.proc;
|
||||||
end|
|
end|
|
||||||
--error 1294
|
--error 1295
|
||||||
call foo()|
|
call foo()|
|
||||||
drop procedure foo|
|
drop procedure foo|
|
||||||
|
|
||||||
# RETURN in FUNCTION only
|
# RETURN in FUNCTION only
|
||||||
--error 1295
|
--error 1296
|
||||||
create procedure foo()
|
create procedure foo()
|
||||||
return 42|
|
return 42|
|
||||||
|
|
||||||
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
||||||
--error 1296
|
--error 1297
|
||||||
create function foo() returns int
|
create function foo() returns int
|
||||||
begin
|
begin
|
||||||
declare x int;
|
declare x int;
|
||||||
@ -137,19 +137,19 @@ create procedure p(x int)
|
|||||||
create function f(x int) returns int
|
create function f(x int) returns int
|
||||||
return x+42|
|
return x+42|
|
||||||
|
|
||||||
--error 1300
|
--error 1301
|
||||||
call p()|
|
call p()|
|
||||||
--error 1300
|
--error 1301
|
||||||
call p(1, 2)|
|
call p(1, 2)|
|
||||||
--error 1300
|
--error 1301
|
||||||
select f()|
|
select f()|
|
||||||
--error 1300
|
--error 1301
|
||||||
select f(1, 2)|
|
select f(1, 2)|
|
||||||
|
|
||||||
drop procedure p|
|
drop procedure p|
|
||||||
drop function f|
|
drop function f|
|
||||||
|
|
||||||
--error 1301
|
--error 1302
|
||||||
create procedure p(val int, out res int)
|
create procedure p(val int, out res int)
|
||||||
begin
|
begin
|
||||||
declare x int default 0;
|
declare x int default 0;
|
||||||
@ -163,7 +163,7 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1301
|
--error 1302
|
||||||
create procedure p(val int, out res int)
|
create procedure p(val int, out res int)
|
||||||
begin
|
begin
|
||||||
declare x int default 0;
|
declare x int default 0;
|
||||||
@ -178,7 +178,7 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1302
|
--error 1303
|
||||||
create function f(val int) returns int
|
create function f(val int) returns int
|
||||||
begin
|
begin
|
||||||
declare x int;
|
declare x int;
|
||||||
@ -196,12 +196,12 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1303
|
--error 1304
|
||||||
select f(10)|
|
select f(10)|
|
||||||
|
|
||||||
drop function f|
|
drop function f|
|
||||||
|
|
||||||
--error 1304
|
--error 1305
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c cursor for insert into test.t1 values ("foo", 42);
|
declare c cursor for insert into test.t1 values ("foo", 42);
|
||||||
@ -210,7 +210,7 @@ begin
|
|||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1305
|
--error 1306
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare x int;
|
declare x int;
|
||||||
@ -220,7 +220,7 @@ begin
|
|||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1306
|
--error 1307
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c cursor for select * from test.t;
|
declare c cursor for select * from test.t;
|
||||||
@ -242,7 +242,7 @@ begin
|
|||||||
open c;
|
open c;
|
||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
--error 1307
|
--error 1308
|
||||||
call p()|
|
call p()|
|
||||||
drop procedure p|
|
drop procedure p|
|
||||||
|
|
||||||
@ -254,11 +254,11 @@ begin
|
|||||||
close c;
|
close c;
|
||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
--error 1308
|
--error 1309
|
||||||
call p()|
|
call p()|
|
||||||
drop procedure p|
|
drop procedure p|
|
||||||
|
|
||||||
--error 1287
|
--error 1288
|
||||||
alter procedure bar3 sql security invoker|
|
alter procedure bar3 sql security invoker|
|
||||||
--error 1059
|
--error 1059
|
||||||
alter procedure bar3 name
|
alter procedure bar3 name
|
||||||
@ -272,7 +272,7 @@ drop table if exists t1|
|
|||||||
create table t1 (val int, x float)|
|
create table t1 (val int, x float)|
|
||||||
insert into t1 values (42, 3.1), (19, 1.2)|
|
insert into t1 values (42, 3.1), (19, 1.2)|
|
||||||
|
|
||||||
--error 1309
|
--error 1310
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c cursor for select * from t1;
|
declare c cursor for select * from t1;
|
||||||
@ -292,7 +292,7 @@ begin
|
|||||||
fetch c into x;
|
fetch c into x;
|
||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
--error 1310
|
--error 1311
|
||||||
call p()|
|
call p()|
|
||||||
drop procedure p|
|
drop procedure p|
|
||||||
|
|
||||||
@ -307,34 +307,34 @@ begin
|
|||||||
fetch c into x, y, z;
|
fetch c into x, y, z;
|
||||||
close c;
|
close c;
|
||||||
end|
|
end|
|
||||||
--error 1310
|
--error 1311
|
||||||
call p()|
|
call p()|
|
||||||
drop procedure p|
|
drop procedure p|
|
||||||
|
|
||||||
--error 1312
|
--error 1313
|
||||||
create procedure p(in x int, x char(10))
|
create procedure p(in x int, x char(10))
|
||||||
begin
|
begin
|
||||||
end|
|
end|
|
||||||
--error 1312
|
--error 1313
|
||||||
create function p(x int, x char(10))
|
create function p(x int, x char(10))
|
||||||
begin
|
begin
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1313
|
--error 1314
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare x float;
|
declare x float;
|
||||||
declare x int;
|
declare x int;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1314
|
--error 1315
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c condition for 1064;
|
declare c condition for 1064;
|
||||||
declare c condition for 1065;
|
declare c condition for 1065;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1315
|
--error 1316
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c cursor for select * from t1;
|
declare c cursor for select * from t1;
|
||||||
@ -358,13 +358,13 @@ drop procedure bug1965|
|
|||||||
#
|
#
|
||||||
# BUG#1966
|
# BUG#1966
|
||||||
#
|
#
|
||||||
--error 1309
|
--error 1310
|
||||||
select 1 into a|
|
select 1 into a|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#336
|
# BUG#336
|
||||||
#
|
#
|
||||||
--error 1317
|
--error 1318
|
||||||
create procedure bug336(id char(16))
|
create procedure bug336(id char(16))
|
||||||
begin
|
begin
|
||||||
declare x int;
|
declare x int;
|
||||||
@ -374,7 +374,7 @@ end|
|
|||||||
#
|
#
|
||||||
# BUG#1654
|
# BUG#1654
|
||||||
#
|
#
|
||||||
--error 1296
|
--error 1297
|
||||||
create function bug1654()
|
create function bug1654()
|
||||||
returns int
|
returns int
|
||||||
return (select sum(t.data) from test.t2 t)|
|
return (select sum(t.data) from test.t2 t)|
|
||||||
|
Reference in New Issue
Block a user