mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
We should prohobit concurent read of inserting file in SP
because it can couse problem with Query cache (BUG#14767) mysql-test/r/query_cache_notembedded.result: BUG#14767 test suite. mysql-test/t/query_cache_notembedded.test: BUG#14767 test suite. sql/sql_insert.cc: Query cache invalidation table we was inserting in just after unlocking table added to avoid the race condition as we had with SP. sql/sql_parse.cc: Query cache invalidation table we was inserting in just after unlocking table added to avoid the race condition as we had with SP. sql/sql_yacc.yy: We should prohibit concurent read of unserting file in SP because it can cause problem with query cache.
This commit is contained in:
@@ -314,4 +314,34 @@ drop procedure f2;
|
||||
drop procedure f3;
|
||||
drop procedure f4;
|
||||
drop table t1;
|
||||
reset query cache;
|
||||
drop function if exists f1;
|
||||
create table t1 (id int);
|
||||
create function f1 ()
|
||||
returns int
|
||||
begin
|
||||
declare i_var int;
|
||||
set i_var = sleep(3);
|
||||
insert into t1 values(3);
|
||||
set i_var = sleep(3);
|
||||
return 0;
|
||||
end;|
|
||||
select f1();
|
||||
select sleep(4);
|
||||
sleep(4)
|
||||
0
|
||||
select * from t1;
|
||||
id
|
||||
3
|
||||
f1()
|
||||
0
|
||||
select * from t1;
|
||||
id
|
||||
3
|
||||
reset query cache;
|
||||
select * from t1;
|
||||
id
|
||||
3
|
||||
drop table t1;
|
||||
drop function f1;
|
||||
set GLOBAL query_cache_size=0;
|
||||
|
||||
Reference in New Issue
Block a user