github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/tests/row_format/data/step3.sql (about)

     1  use `row_format`;
     2  
     3  INSERT INTO multi_data_type( t_boolean, t_bigint, t_double, t_decimal, t_bit
     4                             , t_date, t_datetime, t_timestamp, t_time, t_year
     5                             , t_char, t_varchar, t_blob, t_text, t_enum
     6                             , t_set, t_json)
     7  VALUES ( true, 9223372036875807, 153.123, 123456669012.123456789012, b'1010001'
     8         , '2000-01-01', '9999-12-31 23:59:59', '19731230153000', '23:59:59', 1970
     9         , '测', '测试', 'blob', '测试text', 'enum1'
    10         , 'a,b', '{
    11      "key1": "value1",
    12      "key2": "value2"
    13    }');
    14  
    15  UPDATE multi_data_type
    16  SET t_bigint = 888,
    17      t_json   = '{
    18        "key0": "value0",
    19        "key2": "value2"
    20      }'
    21  WHERE id = 2;
    22  
    23  create table tp_int
    24  (
    25      id          int auto_increment,
    26      c_tinyint   tinyint   null,
    27      c_smallint  smallint  null,
    28      c_mediumint mediumint null,
    29      c_int       int       null,
    30      c_bigint    bigint    null,
    31      constraint pk
    32          primary key (id)
    33  );
    34  
    35  create table tp_text
    36  (
    37      id           int auto_increment,
    38      c_tinytext   tinytext      null,
    39      c_text       text          null,
    40      c_mediumtext mediumtext    null,
    41      c_longtext   longtext      null,
    42      c_varchar    varchar(16)   null,
    43      c_char       char(16)      null,
    44      c_tinyblob   tinyblob      null,
    45      c_blob       blob          null,
    46      c_mediumblob mediumblob    null,
    47      c_longblob   longblob      null,
    48      c_binary     binary(16)    null,
    49      c_varbinary  varbinary(16) null,
    50      constraint pk
    51          primary key (id)
    52  );
    53  
    54  create table tp_time
    55  (
    56      id          int auto_increment,
    57      c_date      date      null,
    58      c_datetime  datetime  null,
    59      c_timestamp timestamp null,
    60      c_time      time      null,
    61      c_year      year      null,
    62      constraint pk
    63          primary key (id)
    64  );
    65  
    66  create table tp_real
    67  (
    68      id        int auto_increment,
    69      c_float   float   null,
    70      c_double  double  null,
    71      c_decimal decimal null,
    72      constraint pk
    73          primary key (id)
    74  );
    75  
    76  create table tp_other
    77  (
    78      id     int auto_increment,
    79      c_enum enum ('a','b','c') null,
    80      c_set  set ('a','b','c')  null,
    81      c_bit  bit(64)            null,
    82      c_json json               null,
    83      constraint pk
    84          primary key (id)
    85  );
    86  
    87  insert into tp_int()
    88  values ();
    89  
    90  insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint)
    91  values (1, 2, 3, 4, 5);
    92  
    93  -- insert max value
    94  insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint)
    95  values (127, 32767, 8388607, 2147483647, 9223372036854775807);
    96  
    97  -- insert min value
    98  insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint)
    99  values (-128, -32768, -8388608, -2147483648, -9223372036854775808);
   100  
   101  insert into tp_text()
   102  values ();
   103  
   104  insert into tp_text(c_tinytext, c_text, c_mediumtext, c_longtext, c_varchar, c_char, c_tinyblob, c_blob, c_mediumblob,
   105                      c_longblob, c_binary, c_varbinary)
   106  values ('89504E470D0A1A0A', '89504E470D0A1A0A', '89504E470D0A1A0A', '89504E470D0A1A0A', '89504E470D0A1A0A',
   107          '89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A'
   108             , x'89504E470D0A1A0A', x'89504E470D0A1A0A', x'89504E470D0A1A0A');
   109  
   110  insert into tp_time()
   111  values ();
   112  
   113  insert into tp_time(c_date, c_datetime, c_timestamp, c_time, c_year)
   114  values ('2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020');
   115  
   116  insert into tp_real()
   117  values ();
   118  
   119  insert into tp_real(c_float, c_double, c_decimal)
   120  values (2020.0202, 2020.0303, 2020.0404);
   121  
   122  insert into tp_other()
   123  values ();
   124  
   125  insert into tp_other(c_enum, c_set, c_bit, c_json)
   126  values ('a', 'a,b', b'1000001', '{
   127    "key1": "value1",
   128    "key2": "value2"
   129  }');