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