github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/test/integration_tests/dm_sql_mode/data/db2.increment.sql (about) 1 set @@session.sql_mode='ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,REAL_AS_FLOAT'; 2 -- NO_AUTO_CREATE_USER set failed in mysql8.0 3 4 use sql_mode; 5 6 -- test sql_mode PIPES_AS_CONCAT 7 set @@session.sql_mode=concat(@@session.sql_mode, ',PIPES_AS_CONCAT'); 8 insert into t_2(name) values('pipes'||'as'||'concat'); 9 10 -- test sql_mode ANSI_QUOTES 11 insert into t_2(name) values("a"); 12 13 -- test sql_mode IGNORE_SPACE 14 set @@session.sql_mode=concat(@@session.sql_mode, ',IGNORE_SPACE'); 15 insert into t_2(name) values(concat ('ignore', 'space')); 16 17 -- test sql_mode NO_AUTO_VALUE_ON_ZERO 18 set @@session.sql_mode=concat(@@session.sql_mode, ',NO_AUTO_VALUE_ON_ZERO'); 19 insert into t_2(id, name) values (20, 'a'); 20 replace into t_2(id, name) values (0, 'c'); 21 22 -- test sql_mode NO_BACKSLASH_ESCAPES 23 set @@session.sql_mode=concat(@@session.sql_mode, ',NO_BACKSLASH_ESCAPES'); 24 insert into t_2(name) values ('\\a'); 25 26 -- test GBK charset BTW 27 insert into t_4 (id, name) values (3, '你好aa3'), (4, '你好AA4'); 28 update t_4 set name = '你好Aa5' where id = 1; 29 delete from t_4 where id = 2; 30 31 create table t_8 (id int, name varchar(20), primary key(`id`)) character set gbk; 32 insert into t_8 (id, name) values (1, '你好Aa'), (2, '你好aA'); 33 insert into t_8 (id, name) values (3, '你好aa3'), (4, '你好AA4'); 34 update t_8 set name = '你好Aa5' where id = 1; 35 delete from t_8 where id = 2; 36 37 create table t_10 (id int, name varchar(20) character set gbk, primary key(`id`)) character set utf8mb4 collate utf8mb4_bin; 38 insert into t_10 (id, name) values (1, '你好Aa'), (2, '你好aA'); 39 insert into t_10 (id, name) values (3, '你好aa3'), (4, '你好AA4'); 40 update t_10 set name = '你好Aa5' where id = 1; 41 delete from t_10 where id = 2;