github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/incremental_mode/data/db1.increment.sql (about) 1 use incremental_mode; 2 insert into t1 (id, name) values (3, 'Eddard Stark'); 3 update t1 set name = 'Arya Stark' where id = 1; 4 update t1 set name = 'Catelyn Stark' where name = 'catelyn'; 5 flush logs; 6 7 -- test multi column index with generated column 8 alter table t1 add column info json; 9 alter table t1 add column gen_id int as (info->"$.id"); 10 alter table t1 add index multi_col(`id`, `gen_id`); 11 insert into t1 (id, name, info) values (4, 'gentest', '{"id": 123}'); 12 insert into t1 (id, name, info) values (5, 'gentest', '{"id": 124}'); 13 update t1 set info = '{"id": 120}' where id = 1; 14 update t1 set info = '{"id": 121}' where id = 2; 15 flush logs; 16 update t1 set info = '{"id": 122}' where id = 3; 17 18 -- test genColumnCache is reset after ddl 19 alter table t1 add column info2 varchar(40); 20 insert into t1 (id, name, info) values (6, 'gentest', '{"id": 125, "test cache": false}'); 21 alter table t1 add unique key gen_idx(`gen_id`); 22 update t1 set name = 'gentestxx' where gen_id = 123; 23 24 insert into t1 (id, name, info) values (7, 'gentest', '{"id": 126}'); 25 update t1 set name = 'gentestxxxxxx' where gen_id = 124; 26 -- delete with unique key 27 delete from t1 where gen_id > 124;