mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added test case for BUG#14270: Stored procedures: crash if load index
which was fixed by earlier changesets; LOAD INDEX is not allowed in functions. Also testing CACHE INDEX, while OPTIMIZE and CHECK were covered by existing tests already. mysql-test/r/sp-error.result: Updated result for new test case (BUG#14270). mysql-test/t/sp-error.test: New test case for BUG#14270.
This commit is contained in:
@ -1147,3 +1147,19 @@ show procedure status;
|
|||||||
Db Name Type Definer Modified Created Security_type Comment
|
Db Name Type Definer Modified Created Security_type Comment
|
||||||
test bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
|
test bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
|
||||||
drop procedure ` bug15658`;
|
drop procedure ` bug15658`;
|
||||||
|
drop function if exists bug14270;
|
||||||
|
drop table if exists t1;
|
||||||
|
create table t1 (s1 int primary key);
|
||||||
|
create function bug14270() returns int
|
||||||
|
begin
|
||||||
|
load index into cache t1;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
ERROR 0A000: Not allowed to return a result set from a function
|
||||||
|
create function bug14270() returns int
|
||||||
|
begin
|
||||||
|
cache index t1 key (`primary`) in keycache1;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
ERROR 0A000: Not allowed to return a result set from a function
|
||||||
|
drop table t1;
|
||||||
|
@ -1643,6 +1643,35 @@ show procedure status;
|
|||||||
drop procedure ` bug15658`;
|
drop procedure ` bug15658`;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#14270: Stored procedures: crash if load index
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop function if exists bug14270;
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create table t1 (s1 int primary key);
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
--error ER_SP_NO_RETSET
|
||||||
|
create function bug14270() returns int
|
||||||
|
begin
|
||||||
|
load index into cache t1;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
|
||||||
|
--error ER_SP_NO_RETSET
|
||||||
|
create function bug14270() returns int
|
||||||
|
begin
|
||||||
|
cache index t1 key (`primary`) in keycache1;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#NNNN: New bug synopsis
|
# BUG#NNNN: New bug synopsis
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user