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

     1  drop database if exists `new_ci_collation_test`;
     2  create database `new_ci_collation_test`;
     3  use `new_ci_collation_test`;
     4  
     5  CREATE TABLE t1 (
     6      a varchar(20) charset utf8mb4 collate utf8mb4_general_ci primary key,
     7      b int default 10
     8  );
     9  
    10  CREATE TABLE t2 (
    11      a varchar(10) charset utf8 collate utf8_general_ci, primary key(a),
    12      b int default 10
    13  );
    14  
    15  CREATE TABLE t3 (
    16      id int primary key auto_increment,
    17      a varchar(20) charset utf8mb4 collate utf8mb4_general_ci,
    18      b int default 10
    19  );
    20  
    21  CREATE TABLE t4 (
    22      a int primary key,
    23      b varchar(10) charset utf8mb4 collate utf8mb4_general_ci,
    24      c varchar(10) charset utf8 collate utf8_general_ci,
    25      d varchar(10) not null,
    26      unique key d(d)
    27  );
    28  
    29  CREATE TABLE t5 (
    30      a varchar(10) charset utf8mb4 collate utf8mb4_bin, primary key(a),
    31      b int default 10
    32  );
    33  
    34  
    35  insert into t1 (a) values ('A'),(' A'),('A\t'),('b'),('bA'),('bac'),('ab');
    36  insert into t1 (a) values ('😉');
    37  insert into t2 (a) values ('A'),(' A'),('A\t'),('b'),('bA'),('bac'),('ab');
    38  insert into t3 (a) values ('A'),('A '),('A   '),(' A'),('A\t'),('A\t ');
    39  insert into t3 (a) values ('a'),('a '),('a   '),(' a'),('a\t'),('a\t ');
    40  insert into t3 (a) values ('B'),('B '),('B   '),(' B'),('B\t'),('B\t ');
    41  insert into t3 (a) values ('b'),('b '),('b   '),(' b'),('b\t'),('b\t ');
    42  insert into t4 values (1,'A','A','1'),(2,'a\t','a\t','2'),(3,'ab','ab','3'),(4,'abc','abc','4');
    43  insert into t5 (a) values ('😉');
    44  insert into t5 (a) values ('a'),('A'),(' a'),(' A'),('a\t'),('ab'),('Ab');
    45  update t1 set b = b + 1;
    46  update t2 set b = 13;
    47  update t3 set b = 11 where a > 'A';
    48  drop index `primary` on t4;
    49  update t5 set b = 12;