| 1 |
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent; |
| 2 |
SET GLOBAL innodb_stats_persistent = 0; |
| 3 |
connect purge_control,localhost,root; |
| 4 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 5 |
connection default; |
| 6 |
create table t1(f1 int not null, f2 blob not null, f3 blob not null, |
| 7 |
vchar char(2) as (substr(f3,2,2)) virtual, |
| 8 |
primary key(f1, f3(5)), index(vchar))engine=innodb; |
| 9 |
insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000)); |
| 10 |
update t1 set f1=5 where f1=1; |
| 11 |
delete from t1 where f1=5; |
| 12 |
connection purge_control; |
| 13 |
COMMIT; |
| 14 |
InnoDB 0 transactions not purged |
| 15 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 16 |
connection default; |
| 17 |
drop table t1; |
| 18 |
create table t1(f1 int not null, f2 blob not null, f3 blob not null, |
| 19 |
vchar char(2) as (substr(f3,2,2)) virtual, |
| 20 |
primary key(f1, f3(5)), index(vchar, f3(2)))engine=innodb; |
| 21 |
insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000)); |
| 22 |
update t1 set f1=5 where f1=1; |
| 23 |
delete from t1 where f1=5; |
| 24 |
connection purge_control; |
| 25 |
COMMIT; |
| 26 |
InnoDB 0 transactions not purged |
| 27 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 28 |
connection default; |
| 29 |
drop table t1; |
| 30 |
create table t1(f1 int not null, f2 blob not null, f3 blob not null, |
| 31 |
vchar blob as (f3) virtual, |
| 32 |
primary key(f1, f3(5)), index(vchar(3)))engine=innodb; |
| 33 |
insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000)); |
| 34 |
update t1 set f1=5 where f1=1; |
| 35 |
delete from t1 where f1=5; |
| 36 |
connection purge_control; |
| 37 |
COMMIT; |
| 38 |
InnoDB 0 transactions not purged |
| 39 |
disconnect purge_control; |
| 40 |
connection default; |
| 41 |
drop table t1; |
| 42 |
SET GLOBAL innodb_stats_persistent = @save_stats_persistent; |