试题详情


Choose the best answer.
You have configured GTID-based asynchronous replication with one master and one slave. A user accidentally updated some data on the slave.
To fix this, you stopped replication and successfully reverted the accidental changes. Examine the current GTID information:
You must fix GTID sets on the slave to avoid replicating unwanted transactions in case of failover. Which set of actions would allow the slave to continue replicating without erroneous transactions?

ARESET MASTER;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa:1-2312; SET GLOBAL gtid_executed=aaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-10167;

BRESET MASTER;
SET GLOBAL gtid_purged=aaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-10167;

CRESET SLAVE;
SET GLOBAL gtid_purged=aaaaa-aaa-aaaa-aaaa-aaaaaaaa:1-3820;
SET GLOBAL gtid_executed=aaaaaa-aaaa-aaa-aaaa-aaaaaaaaaaa:1-10300;

DSET GLOBAL gtid_purged=aaaaaa-aaa-aaa-aaaa-aaaaaaaa:1-2312, bbbbbb-bbbb-bbbb-bbbb- bbbbbbbbbb:1-9;
SET GLOBAL gtid_executed=aaaaaaa-aaaa-aaaa-aaaa-aaaaaa:1-10167;

ERESET SLAVE;
SET GLOBAL gtid_purged=aaaaaaa-aaa-aaaa-aaa-aaaaaaaa:1-10167;