This fixes the problem when it's not possible to run migration twice in case if error happens after GTID_PURGED is applied already. Here we calculate the difference between GTID sets which was already applied on the target service and the one from the dump and add to purged only the difference.
This fixes the problem when it's not possible to run migration twice in case if error happens after GTID_PURGED is applied already. Here we calculate the difference between GTID sets which was already applied on the target service and the one from the dump and add to purged only the difference.