diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-02-08 15:28:00 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-02-10 06:30:42 -0500 |
commit | 8b2e642aa214db729161252b96f36bfbae3add21 (patch) | |
tree | 006dcc588623c7c7ee508eca3534259f62244f2c /mysql-test/suite/rpl | |
parent | f556aa9b5f3685dfcf1b365d2461316cbd16e169 (diff) | |
download | mariadb-git-8b2e642aa214db729161252b96f36bfbae3add21.tar.gz |
MDEV-7635: Update tests to adapt to the new default sql_mode
Diffstat (limited to 'mysql-test/suite/rpl')
32 files changed, 109 insertions, 96 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_checksum_cache.result b/mysql-test/suite/rpl/r/rpl_checksum_cache.result index d3167496249..e8f221cc181 100644 --- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result +++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*"); -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t2 set data=repeat.*'a', @act_size.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); connection master; set @save_binlog_cache_size = @@global.binlog_cache_size; set @save_binlog_checksum = @@global.binlog_checksum; diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index b95654d2245..c7f2d58e426 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -26,7 +26,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc connection conn2; SET AUTOCOMMIT = 1; BEGIN; -UPDATE t SET f = 'magenta 2' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (5 + (2 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -45,7 +45,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown") master-bin.000001 # Query # # ROLLBACK connection conn1; @@ -57,7 +57,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc connection conn2; SET AUTOCOMMIT = 1; BEGIN; -UPDATE t SET f = 'dark blue 2' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (6 + (2 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -74,7 +74,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ connection conn1; @@ -84,7 +84,7 @@ Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them connection conn2; SET AUTOCOMMIT = 0; -UPDATE t SET f = 'magenta 1' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (5 + (1 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -103,7 +103,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown") master-bin.000001 # Query # # ROLLBACK connection conn1; @@ -113,7 +113,7 @@ Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them connection conn2; SET AUTOCOMMIT = 0; -UPDATE t SET f = 'dark blue 1' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (6 + (1 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -130,7 +130,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ connection master; diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_function.result b/mysql-test/suite/rpl/r/rpl_create_drop_function.result index 744e747134d..312175fcf04 100644 --- a/mysql-test/suite/rpl/r/rpl_create_drop_function.result +++ b/mysql-test/suite/rpl/r/rpl_create_drop_function.result @@ -9,7 +9,7 @@ ERROR 42000: FUNCTION hello already exists connection slave; SHOW CREATE FUNCTION hello; Function sql_mode Create Function character_set_client collation_connection Database Collation -hello NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1 +hello STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1 DETERMINISTIC RETURN CONCAT('Hello, ', str, '!') latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 67d1b51559b..aed8bba3bc0 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -148,7 +148,7 @@ GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO 'cr USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 +upgrade_del_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_del_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -160,7 +160,7 @@ connection create_rout_db_slave; USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 +upgrade_del_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_del_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -189,7 +189,7 @@ INSIDE upgrade_alter_func() connection slave; SHOW CREATE FUNCTION upgrade_alter_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_alter_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1 +upgrade_alter_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_alter_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result index 81302266d82..b59c21724b2 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; Warnings: Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', +insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third', Warnings: Warning 1264 Out of range value for column 'f5' at row 1 Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', +insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -409,7 +409,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; Warnings: Warning 1048 Column 'f3' cannot be null diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result index 12567f89af9..b9d254e1b42 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; Warnings: Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', +insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third', Warnings: Warning 1264 Out of range value for column 'f5' at row 1 Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', +insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -409,7 +409,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; Warnings: Warning 1048 Column 'f3' cannot be null diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index eb470fa2274..7717dcf6700 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -38,7 +38,7 @@ use `test`/*!*/; SET TIMESTAMP=1293832861/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index 0d75d1c2000..ee9377906ad 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -389,7 +389,7 @@ use `ts``et`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 115c27d9387..f560f78be45 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -39,8 +39,8 @@ t1 t2 show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg2 INSERT t2 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t1 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg2 INSERT t2 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection slave; connection slave; show tables; @@ -48,7 +48,7 @@ Tables_in_test t1 show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t1 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection master; drop trigger trg1; drop trigger trg2; diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result index 4ae20824b22..f6c7e4ad54e 100644 --- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -25,7 +25,7 @@ create database rewrite; connection master; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 @@ -44,7 +44,7 @@ a b c d 2003-03-03 2003-03-03 2003-03-03 NULL connection master; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index ed3035299c1..1d4b31a4a87 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -673,33 +673,33 @@ CREATE TABLE t1 (a bit) ENGINE='MYISAM' ; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -708,7 +708,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index 2194d8855d4..1e3ddd4f289 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -681,33 +681,33 @@ CREATE TABLE t1 (a bit) ENGINE='INNODB' ; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -716,7 +716,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; include/diff_tables.inc [master:t1, slave:t1] diff --git a/mysql-test/suite/rpl/r/rpl_row_create_select.result b/mysql-test/suite/rpl/r/rpl_row_create_select.result index 5b37b409b09..b064d42982f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_select.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_select.result @@ -7,6 +7,7 @@ include/master-slave.inc connection master; #After the patch, the display width is set to a default #value of 21. +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a; Warnings: Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' @@ -15,6 +16,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a; Warnings: Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result index ef40fd311d3..a558e113c77 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result @@ -6,7 +6,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; @@ -19,7 +19,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result index 84d68bb2b58..915cf030e06 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result @@ -19,7 +19,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; @@ -32,7 +32,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result index 31234a8101f..d6890f22b02 100644 --- a/mysql-test/suite/rpl/r/rpl_sp_effects.result +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -271,6 +271,7 @@ call sp_bug26199('\0'); select sf_bug26199(b'1111111'); sf_bug26199(b'1111111') 0 +SET STATEMENT sql_mode = '' FOR select sf_bug26199(b'101111111'); sf_bug26199(b'101111111') 0 diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index b8a14b380db..5680d22f233 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -78,7 +78,7 @@ connection master1; drop table t1; create table t1 (n int); insert into t1 values(3456); -insert into mysql.user (Host, User, Password) +insert ignore into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value diff --git a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result index 5f31cff94cf..cb2120523b2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result @@ -18,7 +18,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, `decimal` DECIMAL(30,2)) ENGINE = MyISAM; ### insert max unsigned ### a) declarative -INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; +INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; ######################################### SELECT * FROM t1; tinyint 127 @@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1] connection master; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -112,7 +112,7 @@ connection master; TRUNCATE t1; ### insert min signed ### a) declarative -INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; +INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; ######################################### SELECT * FROM t1; tinyint -128 @@ -152,7 +152,7 @@ include/diff_tables.inc [master:t1,slave:t1] connection master; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, @@ -210,12 +210,14 @@ DROP TABLE t1; connection slave; include/rpl_reset.inc connection master; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ; SET @aux = 10294947273192243200; SET @aux1= @aux; INSERT INTO t1 VALUES (@aux) , (@aux1); ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY' +SET sql_mode = DEFAULT; connection slave; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result index d82f02ccd9f..2f7f1b07cb4 100644 --- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -135,11 +135,13 @@ insert into t1 values(concat("for_23_",UUID())); insert into t1 select "yesterday_24_"; create table t2 ENGINE=MyISAM select rpad(UUID(),100,' '); create table t3 select 1 union select UUID(); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); Warnings: Warning 1292 Incorrect datetime value: '3' -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); create procedure foo() begin insert into t1 values("work_25_"); diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index 23e1813d3ff..24d7d6cebf7 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -119,12 +119,12 @@ master-bin.000001 # Query # # COMMIT BEGIN; DROP TEMPORARY TABLE t1; # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)' -INSERT INTO t1 VALUES(uuid()+0); +INSERT IGNORE INTO t1 VALUES(uuid()+0); COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(uuid()+0) +master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO t1 VALUES(uuid()+0) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 37f13c8afb0..e2999cdd225 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -17,7 +17,7 @@ connection slave; connection master; DROP TABLE IF EXISTS t1; CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1265 Data truncated for column 'b' at row 1 @@ -25,7 +25,7 @@ connection slave; include/stop_slave.inc include/start_slave.inc connection master; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1265 Data truncated for column 'b' at row 1 diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result index b9b890443eb..076f0ff20f1 100644 --- a/mysql-test/suite/rpl/r/rpl_timezone.result +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -45,7 +45,7 @@ connection master; connection master; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone2.dat' into table t1; +load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1; Warnings: Warning 1265 Data truncated for column 't' at row 1 Warning 1261 Row 1 doesn't contain data for all columns @@ -125,6 +125,7 @@ connection master; CREATE TABLE t1 (a INT, b TIMESTAMP); INSERT INTO t1 VALUES (1, NOW()); SET @@session.time_zone='Japan'; +SET STATEMENT sql_mode = '' FOR UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; Warnings: Warning 1264 Out of range value for column 'b' at row 1 diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index dcf0c70ffc4..06d5a3c895f 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1127,9 +1127,9 @@ before insert on t1 for each row follows tr1 set NEW.b := (NEW.b+1)*3; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci insert into t1 values (1,1); select * from t1; a b @@ -1137,9 +1137,9 @@ a b connection slave; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci select * from t1; a b 1 64 @@ -1151,11 +1151,11 @@ CREATE OR REPLACE TRIGGER tr BEFORE DELETE ON t1 FOR EACH ROW PRECEDES non_exist ERROR HY000: Referenced trigger 'non_existing_trigger' for the given action time and event type does not exist SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr INSERT t1 SET @a=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection slave; SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr INSERT t1 SET @a=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection master; drop table t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index 15d5d5502a1..37a05064641 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -75,7 +75,7 @@ while ($type) SET AUTOCOMMIT = 0; } --error ER_LOCK_WAIT_TIMEOUT - eval UPDATE t SET f = 'magenta $type' WHERE f = 'red'; + eval UPDATE IGNORE t SET f = 'magenta $type' WHERE f = 'red'; eval INSERT INTO t VALUES (5 + ($type * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -110,7 +110,7 @@ while ($type) SET AUTOCOMMIT = 0; } --error ER_LOCK_WAIT_TIMEOUT - eval UPDATE t SET f = 'dark blue $type' WHERE f = 'red'; + eval UPDATE IGNORE t SET f = 'dark blue $type' WHERE f = 'red'; eval INSERT INTO t VALUES (6 + ($type * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test index aa488258c3b..235545747fa 100644 --- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -34,7 +34,7 @@ create database rewrite; connection master; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; sync_slave_with_master; @@ -43,7 +43,7 @@ select * from rewrite.t1; connection master; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); sync_slave_with_master; connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_row_create_select.test b/mysql-test/suite/rpl/t/rpl_row_create_select.test index ca270e92d0c..d870b68f364 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_select.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_select.test @@ -11,9 +11,11 @@ connection master; --echo #After the patch, the display width is set to a default --echo #value of 21. +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a; SHOW CREATE TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a; SHOW CREATE TABLE t2; diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index b9d637320bb..05bd49330ed 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -239,6 +239,7 @@ DELIMITER ;// call sp_bug26199(b'1110'); call sp_bug26199('\0'); select sf_bug26199(b'1111111'); +SET STATEMENT sql_mode = '' FOR select sf_bug26199(b'101111111'); select sf_bug26199('\''); select hex(b) from t2; diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 3a87a8f1ef9..7e8f669ff34 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -113,7 +113,7 @@ connection master1; drop table t1; create table t1 (n int); insert into t1 values(3456); -insert into mysql.user (Host, User, Password) +insert ignore into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); select select_priv,user from mysql.user where user = _binary'blafasel2'; update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; diff --git a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test index 74e54f9624d..493ea4cd967 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test @@ -32,7 +32,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, -- echo ### insert max unsigned -- echo ### a) declarative --- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); +-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); -- echo ######################################### -- query_vertical SELECT * FROM t1 @@ -47,7 +47,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, TRUNCATE t1; -- echo ### b) user var -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -77,7 +77,7 @@ TRUNCATE t1; -- echo ### insert min signed -- echo ### a) declarative --- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); +-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); -- echo ######################################### -- query_vertical SELECT * FROM t1 @@ -92,7 +92,7 @@ TRUNCATE t1; TRUNCATE t1; -- echo ### b) user var -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, @@ -135,7 +135,7 @@ DROP TABLE t1; ##################################################################### --source include/rpl_reset.inc -- connection master - +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; # offending trigger that would reset the unsigned flag for aux before @@ -146,6 +146,7 @@ SET @aux = 10294947273192243200; SET @aux1= @aux; -- error ER_DUP_ENTRY INSERT INTO t1 VALUES (@aux) , (@aux1); +SET sql_mode = DEFAULT; -- sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index fa611538aed..070e5189949 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -187,7 +187,7 @@ DROP TEMPORARY TABLE t1; --echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)' --disable_warnings -INSERT INTO t1 VALUES(uuid()+0); +INSERT IGNORE INTO t1 VALUES(uuid()+0); --enable_warnings COMMIT; diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index e3f5a0be573..729f275bb0d 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -80,7 +80,7 @@ disable_warnings; DROP TABLE IF EXISTS t1; enable_warnings; CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; sync_slave_with_master; @@ -88,7 +88,7 @@ source include/stop_slave.inc; source include/start_slave.inc; connection master; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; sync_slave_with_master; # cleanup diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test index 1f0220421ab..2c02cda9875 100644 --- a/mysql-test/suite/rpl/t/rpl_timezone.test +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -71,7 +71,7 @@ connection master; connection master; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone2.dat' into table t1; +load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1; SELECT * FROM t1 ORDER BY n; sync_slave_with_master; set time_zone='UTC'; @@ -157,6 +157,7 @@ CREATE TABLE t1 (a INT, b TIMESTAMP); INSERT INTO t1 VALUES (1, NOW()); SET @@session.time_zone='Japan'; +SET STATEMENT sql_mode = '' FOR UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; SELECT * FROM t1 ORDER BY a; |