You have a MySQL replication setup and you intentionally stop the SQL thread on the slave.
mysql> SHOW SLAVE STATUS\ G
...
Slave_IO_Running: Yes
Slave_SQL_Running: No
What are two reasons that you may stop the SQL thread on the slave while keeping the I/ O thread running?
A. to allow the remaining events to be processed on the slave while not receiving new events from the master
B. to allow a backup to be created under reduced load
C. to allow for point-in-time recovery on the slave
D. to prevent schema changes from propagating to the slave before they are validated
E. to prevent any transaction experiencing a deadlock
Answer:BC
关闭 Slave_SQL_Running,slave 依旧要接收信息的,所以错
stopping only the SQL thread can be useful if you want to perform a backup or other task.
B.不进行 sql 应用, 降低负载
C.没有 sql 应用,所以能取到当时时间点的数据
D.防止用户没有经过验证的改变,应该是指的延迟复制, CHANGE MASTER TO MASTER_DELAY =N;
E.防止事务死锁, 没这效果
Stopping the I/O thread but permitting
the SQL thread to run helps ensure that there is not a massive backlog of events to be executed when replication is started again.