Commit c3612b41 authored by unknown's avatar unknown

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.
parent 5dda41a7
......@@ -1147,3 +1147,19 @@ show procedure status;
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
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`;
#
# 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
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment