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