sql_slave_skip_counter
-- sql_slave_skip_counter
The number of events from the source that a replica should skip. Setting the option has no immediate effect. The variable applies to the next START SLAVE statement; the next START SLAVE statement also changes the value back to 0. When this variable is set to a nonzero value and there are multiple replication channels configured, the START SLAVE statement can only be used with the FOR CHANNEL channel clause.
此引數可以指定副本跳過多少event。 設定此引數不會立即生效。 在設定完此引數,使用start slave 引數會生效。 start slave 命令同時也會使sql_slave_skip_counter 的設定歸零。 當複製有多個channel 時,start slave 需要指定特定的channel。
This option is incompatible with GTID-based replication, and must not be set to a nonzero value when gtid_mode=ON. If you need to skip transactions when employing GTIDs, use gtid_executed from the source instead. See Section 16.1.7.3, “Skipping Transactions”.
此引數和基於GTID的複製是不相容的。在基於GTID複製時,即gtid_mode=on 時不要將此引數設定為非0。 在基於GTID 的複製中需要跳過事務,可以在源端使用gtid_executed 代替。
If skipping the number of events specified by setting this variable would cause the replica to begin in the middle of an event group, the replica continues to skip until it finds the beginning of the next event group and begins from that point. For more information, see Section 16.1.7.3, “Skipping Transactions”.
參考文件:
https://dev.mysql.com/doc/refman/5.7/en/replication-options-replica.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21374452/viewspace-2781061/,如需轉載,請註明出處,否則將追究法律責任。