2015-09-11 10:51:56 +02:00
include/master-slave.inc
[connection master]
2016-03-25 20:51:22 +04:00
connection slave;
2015-09-11 10:51:56 +02:00
include/stop_slave_sql.inc
2016-03-25 20:51:22 +04:00
connection master;
2015-09-11 10:51:56 +02:00
CALL mtr.add_suppression("Statement is unsafe because it uses a system function that may return a different value on the slave");
create table t1 (i int);
insert into t1 values (1),(2);
insert into t1 values (3),(4);
insert into t1 select i+20+0*sleep(1) from t1 where i=1;
Warnings:
2016-10-03 18:49:44 +03:00
Note 1592 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
2015-09-11 10:51:56 +02:00
flush logs;
insert into t1 values (5),(6);
insert into t1 values (7),(8);
insert into t1 values (9),(10);
insert into t1 values (11),(12);
insert into t1 values (13),(14);
insert into t1 values (15),(16);
2016-03-25 20:51:22 +04:00
connection slave;
2015-09-11 10:51:56 +02:00
set global slave_parallel_threads = 1;
start slave until master_log_file='MASTER_FILE', master_log_pos=MASTER_POS;
drop table t1;
include/stop_slave_io.inc
set global slave_parallel_threads = DEFAULT;
2016-03-25 20:51:22 +04:00
connection master;
2015-09-11 10:51:56 +02:00
drop table t1;
include/rpl_end.inc