• Brandon Nesterenko's avatar
    MDEV-20122: Deprecate MASTER_USE_GTID=Current_Pos to favor new MASTER_DEMOTE_TO_SLAVE option · 90c3b283
    Brandon Nesterenko authored
    New Feature:
    ========
    This feature adds a safe replacement to the
    MASTER_USE_GTID=Current_Pos option for CHANGE MASTER TO as
    MASTER_DEMOTE_TO_SLAVE=<bool>. The use case of Current_Pos is to
    transition a master to become a slave; however, can break
    replication state if the slave executes local transactions due to
    actively updating gtid_current_pos with gtid_binlog_pos and
    gtid_slave_pos.
    
    MASTER_DEMOTE_TO_SLAVE changes this use case by forcing users to set
    Using_Gtid=Slave_Pos and merging gtid_binlog_pos into gtid_slave_pos
    once at CHANGE MASTER TO time. Note that if gtid_slave_pos is more
    recent than gtid_binlog_pos (as in the case of chain replication),
    the replication state should be preserved.
    
    Additionally, deprecate the `Current_Pos` option of MASTER_USE_GTID
    to suggest the safe alternative option MASTER_DEMOTE_TO_SLAVE=TRUE.
    
    Reviewed By:
    ============
    Andrei Elkin <andrei.elkin@mariadb.com>
    90c3b283
rpl_mdev6386.result 1.66 KB