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