• unknown's avatar
    MDEV-4820: Empty master does not give error for slave GTID position that does... · f0deff86
    unknown authored
    MDEV-4820: Empty master does not give error for slave GTID position that does not exist in the binlog
    
    The main bug here was the following situation:
    
    Suppose we set up a completely new master2 as an extra multi-master to an
    existing slave that already has a different master1 for domain_id=0. When the
    slave tries to connect to master2, master2 will not have anything that slave
    requests in domain_id=0, but that is fine as master2 is supposedly meant to
    serve eg. domain_id=1. (This is MDEV-4485).
    
    But suppose that master2 then actually starts sending events from
    domain_id=0. In this case, the fix for MDEV-4485 was incomplete, and the code
    would fail to give the error that the position requested by the slave in
    domain_id=0 was missing from the binlogs of master2. This could lead to lost
    events or completely wrong replication.
    
    The patch for this bug fixes this issue.
    
    In addition, it cleans up the code a bit, getting rid of the fake_gtid_hash in
    the code. And the error message when slave and master have diverged due to
    alternate future is clarified, as requested in the bug description.
    
    f0deff86
rpl_gtid_mdev4820.test 3.33 KB