github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/test/integration_tests/dm_sql_mode/data/db1.increment.sql (about)

     1  set @@session.SQL_MODE='';
     2  use `sql_mode`;
     3  
     4  -- test sql_mode PIPES_AS_CONCAT
     5  insert into t_1(num) values('pipes'||'as'||'concat');
     6  
     7  -- test sql_mode ANSI_QUOTES
     8  insert into t_1(name) values("a");
     9  
    10  -- test sql_mode IGNORE_SPACE
    11  create table sum (id int not null, primary key(id));
    12  
    13  -- test sql_mode NO_AUTO_VALUE_ON_ZERO
    14  insert into t_1(id, name) values (30, 'a');
    15  insert into t_1(id, name) values (0, 'b');
    16  insert into t_1(id, name) values (0, 'c');
    17  
    18  -- test sql_mode NO_BACKSLASH_ESCAPES
    19  insert into t_1(name) values ('\\b');
    20  
    21  -- test sql_mode STRICT_TRANS_TABLES && STRICT_ALL_TABLES && NO_ZERO_IN_DATE && NO_ZERO_DATE && ALLOW_INVALID_DATES
    22  insert into t_1(dt) values('0000-06-00');
    23  insert into t_1(dt) values('0000-00-01');
    24  insert into t_1(dt) values('0000-06-01');
    25  insert into t_1(dt) values('0000-00-00');
    26  
    27  -- test sql_mode ERROR_FOR_DIVISION_BY_ZERO
    28  insert into t_1(num) values(4/0);
    29  
    30  -- test sql_mode NO_AUTO_CREATE_USER
    31  drop user if exists 'no_auto_create_user';
    32  grant select on *.* to 'no_auto_create_user';
    33  
    34  -- test GBK charset BTW
    35  insert into t_3 (id, name) values (3, '你好3'), (4, '你好4');
    36  update t_3 set name = '你好5' where id = 1;
    37  delete from t_3 where id = 2;
    38  
    39  create table t_7 (id int, name varchar(20), primary key(`id`)) character set gbk;
    40  insert into t_7 (id, name) values (1, '你好1'), (2, '你好2');
    41  insert into t_7 (id, name) values (3, '你好3'), (4, '你好4');
    42  update t_7 set name = '你好5' where id = 1;
    43  delete from t_7 where id = 2;
    44  
    45  create table t_9 (id int, name varchar(20) character set gbk, primary key(`id`)) character set utf8;
    46  insert into t_9 (id, name) values (1, '你好1'), (2, '你好2');
    47  insert into t_9 (id, name) values (3, '你好3'), (4, '你好4');
    48  update t_9 set name = '你好5' where id = 1;
    49  delete from t_9 where id = 2;