• Kristian Nielsen's avatar
    MDEV-4937: sql_slave_skip_counter does not work with GTID · 9150a0c7
    Kristian Nielsen authored
    The sql_slave_skip_counter is important to be able to recover replication from
    certain errors. Often, an appropriate solution is to set
    sql_slave_skip_counter to skip over a problem event. But setting
    sql_slave_skip_counter produced an error in GTID mode, with a suggestion to
    instead set @@gtid_slave_pos to point past the problem event. This however is
    not always possible; for example, in case of an INCIDENT event, that event
    does not have any GTID to assign to @@gtid_slave_pos.
    
    With this patch, sql_slave_skip_counter now works in GTID mode the same was as
    in non-GTID mode. When set, that many initial events are skipped when the SQL
    thread starts, plus as many extra events are needed to completely skip any
    partially skipped event group. The GTID position is updated to point past the
    skipped event(s).
    9150a0c7
rpl_gtid_errorlog.test 2.14 KB