1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-19 19:03:26 +03:00

Merge mysql.com:/usr/local/bk/mysql-5.0

into mysql.com:/home/pem/work/mysql-5.0
This commit is contained in:
unknown
2005-04-27 13:24:40 +02:00
6 changed files with 129 additions and 0 deletions

View File

@@ -831,6 +831,67 @@ begin
end|
#
# BUG#8408: Stored procedure crash if function contains SHOW
# BUG#9058: Stored Procedures: Crash if function included SELECT
#
--disable_warnings
drop function if exists bug8408|
drop procedure if exists bug8408|
--enable_warnings
# Some things are caught when parsing
--error ER_SP_NO_RETSET_IN_FUNC
create function bug8408() returns int
begin
select * from t1;
return 0;
end|
--error ER_SP_NO_RETSET_IN_FUNC
create function bug8408() returns int
begin
show warnings;
return 0;
end|
--error ER_SP_NO_RETSET_IN_FUNC
create function bug8408(a int) returns int
begin
declare b int;
select b;
return b;
end|
# Some things must be caught at invokation time
create function bug8408() returns int
begin
call bug8408();
return 0;
end|
create procedure bug8408()
select * from t1|
call bug8408()|
--error ER_SP_BADSELECT
select bug8408()|
drop procedure bug8408|
drop function bug8408|
# But this is ok
create function bug8408() returns int
begin
declare n int default 0;
select count(*) into n from t1;
return n;
end|
insert into t1 value (2, 2.7), (3, 3.14), (7, 7.0)|
select *,bug8408() from t1|
drop function bug8408|
delete from t1|
#
# BUG#NNNN: New bug synopsis
#