-
unknown authored
Fix MDEV-4275 - I/O thread restart duplicates events in the relay log. The first time we connect to master after CHANGE MASTER or restart, we connect from the GTID position. But then subsequent reconnects or IO thread restarts reconnect with the old-style file/offset binlog pos from where it left off at last disconnect. This is necessary to avoid duplicate events in the relay logs, as there is nothing that synchronises the SQL thread update of GTID state (multiple threads in case of multi-source) with IO thread reconnects. Test cases. Some small cleanups and fixes.
9bb989a9