| 1 |
-- source include/have_innodb.inc |
| 2 |
-- source include/have_query_cache.inc |
| 3 |
-- source include/not_embedded.inc |
| 4 |
|
| 5 |
--echo # |
| 6 |
--echo # MDEV-16087 Inconsistent SELECT results when query cache is enabled |
| 7 |
--echo # |
| 8 |
|
| 9 |
set GLOBAL query_cache_type=ON; |
| 10 |
set LOCAL query_cache_type=ON; |
| 11 |
|
| 12 |
create table t1 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB; |
| 13 |
create table t2 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB; |
| 14 |
create table t3 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB; |
| 15 |
|
| 16 |
connect (con1,localhost,root); |
| 17 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 18 |
select * from t2; |
| 19 |
|
| 20 |
connection default; |
| 21 |
insert into t3 () values (); |
| 22 |
|
| 23 |
connection con1; |
| 24 |
insert into t1 () values (); |
| 25 |
select * from t3; |
| 26 |
|
| 27 |
connect (con2,localhost,root); |
| 28 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 29 |
select * from t3; |
| 30 |
select * from t3; |
| 31 |
select sql_no_cache * from t3; |
| 32 |
|
| 33 |
rollback; |
| 34 |
|
| 35 |
connection con1; |
| 36 |
|
| 37 |
rollback; |
| 38 |
|
| 39 |
disconnect con1; |
| 40 |
disconnect con2; |
| 41 |
connection default; |
| 42 |
|
| 43 |
drop table t1; |
| 44 |
drop table t2; |
| 45 |
drop table t3; |
| 46 |
|
| 47 |
set GLOBAL query_cache_type=default; |