1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed BUG#9902: Crash with simple stored function using user defined variables

... actually, it was a query cache problem. (It shouldn't cache such queries)


mysql-test/r/sp.result:
  Added testcase for BUG#9902.
mysql-test/t/sp.test:
  Added testcase for BUG#9902.
sql/sql_yacc.yy:
  Don't cache queries which are calling stored functions.
This commit is contained in:
unknown
2005-04-15 11:06:25 +02:00
parent e35244d626
commit 53c095f083
3 changed files with 53 additions and 2 deletions

View File

@ -2936,4 +2936,26 @@ select @tmp1, @tmp2|
50 60
drop procedure bug9598_1|
drop procedure bug9598_2|
drop procedure if exists bug9902|
create function bug9902() returns int(11)
begin
set @x = @x + 1;
return @x;
end|
set @qcs1 = @@query_cache_size|
set global query_cache_size = 100000|
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
bug9902()
2
select bug9902() from t1|
bug9902()
3
select @x|
@x
3
set global query_cache_size = @qcs1|
delete from t1|
drop function bug9902|
drop table t1,t2;