github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/tests/integration_tests/tiflash/data/prepare.sql (about) 1 drop database if exists `cdc_tiflash_test`; 2 create database `cdc_tiflash_test`; 3 use `cdc_tiflash_test`; 4 5 CREATE TABLE multi_data_type 6 ( 7 id INT AUTO_INCREMENT, 8 t_boolean BOOLEAN, 9 t_bigint BIGINT, 10 t_double DOUBLE, 11 t_decimal DECIMAL(38, 19), 12 t_bit BIT(64), 13 t_date DATE, 14 t_datetime DATETIME, 15 t_timestamp TIMESTAMP NULL, 16 t_time TIME, 17 t_year YEAR, 18 t_char CHAR, 19 t_varchar VARCHAR(10), 20 t_blob BLOB, 21 t_text TEXT, 22 t_enum ENUM ('enum1', 'enum2', 'enum3'), 23 t_set SET ('a', 'b', 'c'), 24 t_json JSON, 25 PRIMARY KEY (id) 26 ) ENGINE = InnoDB 27 DEFAULT CHARSET = utf8 28 COLLATE = utf8_bin; 29 30 INSERT INTO multi_data_type() VALUES (); 31 32 INSERT INTO multi_data_type( t_boolean, t_bigint, t_double, t_decimal, t_bit 33 , t_date, t_datetime, t_timestamp, t_time, t_year 34 , t_char, t_varchar, t_blob, t_text, t_enum 35 , t_set, t_json) 36 VALUES ( true, 9223372036854775807, 123.123, 123456789012.123456789012, b'1000001' 37 , '1000-01-01', '9999-12-31 23:59:59', '19731230153000', '23:59:59', 1970 38 , '测', '测试', 'blob', '测试text', 'enum2' 39 , 'a,b', NULL); 40 41 ALTER TABLE multi_data_type SET TIFLASH REPLICA 1; 42 43 INSERT INTO multi_data_type() VALUES (); 44 45 INSERT INTO multi_data_type( t_boolean, t_bigint, t_double, t_decimal, t_bit 46 , t_date, t_datetime, t_timestamp, t_time, t_year 47 , t_char, t_varchar, t_blob, t_text, t_enum 48 , t_set, t_json) 49 VALUES ( false, 666, 123.777, 123456789012.123456789012, b'1000001' 50 , '1000-01-01', '9999-12-31 23:59:59', '19731230153000', '23:59:59', 1970 51 , '测', '测试', 'blob', '测试text11', 'enum3' 52 , 'a,b', NULL); 53 54 UPDATE multi_data_type 55 SET t_bigint = 555 56 WHERE id = 1; 57 58 SET GLOBAL tidb_row_format_version = 2; 59 60 INSERT INTO multi_data_type() VALUES (); 61 62 INSERT INTO multi_data_type( t_boolean, t_bigint, t_double, t_decimal, t_bit 63 , t_date, t_datetime, t_timestamp, t_time, t_year 64 , t_char, t_varchar, t_blob, t_text, t_enum 65 , t_set, t_json) 66 VALUES ( true, 9223372036875807, 153.123, 123456669012.123456789012, b'1010001' 67 , '2000-01-01', '9999-12-31 23:59:59', '19731230153000', '23:59:59', 1970 68 , '测', '测试', 'blob', '测试text', 'enum1' 69 , 'a,b', '{ 70 "key1": "value1", 71 "key2": "value2" 72 }'); 73 74 UPDATE multi_data_type 75 SET t_bigint = 888, 76 t_json = '{ 77 "key0": "value0", 78 "key2": "value2" 79 }' 80 WHERE id = 2;