能不能利用复制报错,让从库停在同一个复制的位置上?

情况模拟:
在主库上创建一个表:
create table test_flag(id int);
 
在从库上:
drop table test_flag;
 
主库上:
drop table test_flag;
 
从库都停在:drop table,找不到表的报错,你会惊奇的发现,所有的从库都停在同一个GTID位置,同样的Relay_master_log_file,exec_master_log_pos。
 
停在同一个点的意义:
主库M需要下线维护,M->(S1,S2) 复制架构要变成M->S1->S2复制架构,在线切换。
这时候S1和S2理论上数据是一致的。
原文地址:https://www.cnblogs.com/liang545621/p/9400876.html