--source include/master-slave.inc CREATE DATABASE `db1`; USE `db1`; CREATE TABLE `table1` (`ID` bigint(20) primary key) ENGINE=InnoDB; CREATE TABLE `table2` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `DIVISION_ID` bigint(20) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `FK_TABLE1_DIVISION_1` (`DIVISION_ID`), CONSTRAINT `FK_TABLE1_DIVISION_1` FOREIGN KEY (`DIVISION_ID`) REFERENCES `table1` (`ID`) ON DELETE CASCADE ) ENGINE=InnoDB; --error 1217 DROP TABLE IF EXISTS `db1`.`table1`; use test; create table t1(f1 int); insert into t1 values(1); insert into t1 values(1); insert into t1 values(1); insert into t1 values(1); insert into t1 values(1); insert into t1 values(1); select count(*) from t1; connection slave; sleep 2; --vertical_results show slave status; --let $gtid=`select substring_index(@@global.gtid_executed, ':', 1)` stop slave; --eval set gtid_next='$gtid:5' begin; commit; set gtid_next='automatic'; start slave; sleep 2; show slave status;