Debian Codegraph @

mysql-test/suite/gcol/t/gcol_update.test

raw
1 --source include/have_innodb.inc
2
3 SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
4 SET GLOBAL innodb_stats_persistent = 0;
5
6 connect (purge_control,localhost,root);
7 START TRANSACTION WITH CONSISTENT SNAPSHOT;
8
9 connection default;
10
11 # Index on virtual column
12
13 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
14 vchar char(2) as (substr(f3,2,2)) virtual,
15 primary key(f1, f3(5)), index(vchar))engine=innodb;
16
17 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
18
19 update t1 set f1=5 where f1=1;
20 delete from t1 where f1=5;
21
22 connection purge_control;
23 COMMIT;
24 --source ../../innodb/include/wait_all_purged.inc
25 START TRANSACTION WITH CONSISTENT SNAPSHOT;
26 connection default;
27
28 drop table t1;
29
30 # Index on virtual column and blob
31
32 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
33 vchar char(2) as (substr(f3,2,2)) virtual,
34 primary key(f1, f3(5)), index(vchar, f3(2)))engine=innodb;
35
36 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
37
38 update t1 set f1=5 where f1=1;
39 delete from t1 where f1=5;
40
41 connection purge_control;
42 COMMIT;
43 --source ../../innodb/include/wait_all_purged.inc
44 START TRANSACTION WITH CONSISTENT SNAPSHOT;
45 connection default;
46 drop table t1;
47
48 # Index on virtual column of blob type
49
50 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
51 vchar blob as (f3) virtual,
52 primary key(f1, f3(5)), index(vchar(3)))engine=innodb;
53
54 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
55
56 update t1 set f1=5 where f1=1;
57 delete from t1 where f1=5;
58
59 connection purge_control;
60 COMMIT;
61 --source ../../innodb/include/wait_all_purged.inc
62 disconnect purge_control;
63
64 connection default;
65 drop table t1;
66
67 SET GLOBAL innodb_stats_persistent = @save_stats_persistent;