github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/tests/integration_tests/avro_basic/data/data.sql (about)

     1  drop database if exists test;
     2  create database test;
     3  use test;
     4  
     5  create table t (
     6     id          int primary key auto_increment,
     7  
     8     c_tinyint   tinyint   null,
     9     c_smallint  smallint  null,
    10     c_mediumint mediumint null,
    11     c_int       int       null,
    12     c_bigint    bigint    null,
    13  
    14     c_unsigned_tinyint   tinyint   unsigned null,
    15     c_unsigned_smallint  smallint  unsigned null,
    16     c_unsigned_mediumint mediumint unsigned null,
    17     c_unsigned_int       int       unsigned null,
    18     c_unsigned_bigint    bigint    unsigned null,
    19  
    20     c_float   float   null,
    21     c_double  double  null,
    22     c_decimal decimal null,
    23     c_decimal_2 decimal(10, 4) null,
    24  
    25     c_unsigned_float     float unsigned   null,
    26     c_unsigned_double    double unsigned  null,
    27     c_unsigned_decimal   decimal unsigned null,
    28     c_unsigned_decimal_2 decimal(10, 4) unsigned null,
    29  
    30     c_date      date      null,
    31     c_datetime  datetime  null,
    32     c_timestamp timestamp null,
    33     c_time      time      null,
    34     c_year      year      null,
    35  
    36     c_tinytext   tinytext      null,
    37     c_text       text          null,
    38     c_mediumtext mediumtext    null,
    39     c_longtext   longtext      null,
    40  
    41     c_tinyblob   tinyblob      null,
    42     c_blob       blob          null,
    43     c_mediumblob mediumblob    null,
    44     c_longblob   longblob      null,
    45  
    46     c_char       char(16)      null,
    47     c_varchar    varchar(16)   null,
    48     c_binary     binary(16)    null,
    49     c_varbinary  varbinary(16) null,
    50  
    51     c_enum enum ('a','b','c') null,
    52     c_set  set ('a','b','c')  null,
    53     c_bit  bit(64)            null,
    54     c_json json               null,
    55  
    56  -- gbk dmls
    57     name varchar(128) CHARACTER SET gbk,
    58     country char(32) CHARACTER SET gbk,
    59     city varchar(64),
    60     description text CHARACTER SET gbk,
    61     image tinyblob
    62  );
    63  
    64  insert into t values (
    65       2,
    66       1, 2, 3, 4, 5,
    67       1, 2, 3, 4, 5,
    68       2020.0202, 2020.0303, 2020.0404, 2021.1208,
    69       3.1415, 2.7182, 8000, 179394.233,
    70       '2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020',
    71       '89504E470D0A1A0A', '89504E470D0A1A0A', '89504E470D0A1A0A', '89504E470D0A1A0A',
    72       x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
    73       '89504E470D0A1A0A', '89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
    74       'b', 'b,c', b'1000001', '{
    75  "key1": "value1",
    76  "key2": "value2",
    77  "key3": "123"
    78  }',
    79       '测试', "中国", "上海", "你好,世界", 0xC4E3BAC3CAC0BDE7
    80  );
    81  
    82  insert into t values (
    83       3,
    84       127, 32767, 8388607, 2147483647, 9223372036854775807,
    85       255, 65535, 16777215, 4294967295, 18446744073709551615,
    86       2020.0202, 2020.0303, 2020.0404, 2021.1208,
    87       2020.0202, 2020.0303, 2020.0404, 2021.1208,
    88       '2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020',
    89       '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B',
    90       x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
    91       '89504E470D0A1A0B', '89504E470D0A1A0B', x'89504E470D0A1A0B', x'89504E470D0A1A0B',
    92       'b', 'b,c', b'1000001', '{
    93  "key1": "value1",
    94  "key2": "value2",
    95  "key3": "123"
    96  }',
    97       '部署', "美国", "纽约", "世界,你好", 0xCAC0BDE7C4E3BAC3
    98  );
    99  
   100  
   101  insert into t values (
   102       4,
   103       -128, -32768, -8388608, -2147483648, -9223372036854775808,
   104       0, 0, 0, 0, 0,
   105       -2.7182818284, -3.1415926, -8000, -179394.233,
   106       3.1415, 2.7182, 8000, 179394.233,
   107       '2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020',
   108       '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B',
   109       x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
   110       '89504E470D0A1A0B', '89504E470D0A1A0B', x'89504E470D0A1A0B', x'89504E470D0A1A0B',
   111       'b', 'b,c', b'1000001', '{
   112  "key1": "value1",
   113  "key2": "value2",
   114  "key3": "123"
   115  }',
   116       '部署', "美国", "纽约", "世界,你好", 0xCAC0BDE7C4E3BAC3
   117  );
   118  
   119  update t set c_float = 3.1415, c_double = 2.7182, c_decimal = 8000, c_decimal_2 = 179394.233 where id = 3;
   120  
   121  
   122  alter table t add column a double null;
   123  
   124  insert into t values (
   125       5,
   126       -128, -32768, -8388608, -2147483648, -9223372036854775808,
   127       0, 0, 0, 0, 0,
   128       -2.7182818284, -3.1415926, -8000, -179394.233,
   129       3.1415, 2.7182, 8000, 179394.233,
   130       '2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020',
   131       '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B',
   132       x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
   133       '89504E470D0A1A0B', '89504E470D0A1A0B', x'89504E470D0A1A0B', x'89504E470D0A1A0B',
   134       'b', 'b,c', b'1000001', '{
   135  "key1": "value1",
   136  "key2": "value2",
   137  "key3": "123"
   138  }',
   139       '部署', "美国", "纽约", "世界,你好", 0xCAC0BDE7C4E3BAC3, 3.1415
   140  );
   141  
   142  alter table t modify c_float double null;
   143  insert into t values (
   144       6,
   145       -128, -32768, -8388608, -2147483648, -9223372036854775808,
   146       0, 0, 0, 0, 0,
   147       -2.7182818284, -3.1415926, -8000, -179394.233,
   148       3.1415, 2.7182, 8000, 179394.233,
   149       '2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020',
   150       '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B', '89504E470D0A1A0B',
   151       x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A',
   152       '89504E470D0A1A0B', '89504E470D0A1A0B', x'89504E470D0A1A0B', x'89504E470D0A1A0B',
   153       'b', 'b,c', b'1000001', '{
   154  "key1": "value1",
   155  "key2": "value2",
   156  "key3": "123"
   157  }',
   158       '部署', "美国", "纽约", "世界,你好", 0xCAC0BDE7C4E3BAC3, 3.1415
   159   );
   160  
   161  alter table t drop column c_smallint;
   162  insert into t(c_tinyint, c_mediumint, c_int, c_bigint, a) values (4, 5, 6, 7, 8);
   163  
   164  alter table t modify c_mediumint varchar(10) null;
   165  insert into t(c_tinyint, c_mediumint, c_int, c_bigint, a) values (5, "234", 6, 7, 8);
   166  
   167  create table finish_mark
   168  (
   169      id int PRIMARY KEY
   170  );