1
0
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:
unknown
2006-01-31 16:27:57 +01:00
parent 5dda41a717
commit c3612b4134
2 changed files with 45 additions and 0 deletions

View File

@ -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;