Bug #79161 mysqlrpladmin creates errant transactions
Submitted: 6 Nov 2015 20:59 Modified: 27 Jan 2020 18:14
Reporter: monty solomon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S2 (Serious)
Version:1.5.6 OS:Any
Assigned to: CPU Architecture:Any

[6 Nov 2015 20:59] monty solomon
Description:
mysqlrpladmin switchover executes some statements on the slave(s) and creates errant transactions.

How to repeat:
Execute a mysqlrpladmin switchover command while using GTID.

mysqlrpladmin switchover --verbose --discover-slaves-login=.mysqlrpladmin.cnf[white-fog] --master=.mysqlrpladmin.cnf[white-fog] --new-master=.mysqlrpladmin.cnf[calm-shape] --demote-master --rpl-user=SUSR_Repl:redacted --log=mysqlrpladmin.log --timeout=5

Observe new errant transactions on the slave(s).

Subsequent mysqlrpladmin switchover commands will then complain about the errant transactions.

Suggested fix:
Set sql_log_bin to 0 for statements executed on the slave(s).
[2 Dec 2016 9:59] Chiranjeevi Battula
Hello monty solomon,

Thank you for the bug report.
The only workaround is for now to skip the errant transactions on the slaves. Take the GTIDs listed in the output of rpladmin and skip them on all slaves. That will fix it. 

Thanks,
Chiranjeevi.
[7 Dec 2016 2:02] monty solomon
When executing commands on the slave that might cause errant GTIDs it should first execute

SET sql_log_bin = 0

to prevent the errant GTIDs.
[27 Jan 2020 18:14] MySQL Verification Team
https://downloads.mysql.com/archives/utilities/

MySQL Utilities is now covered under Oracle Lifetime Sustaining Support
Per Oracle's Lifetime Support policy, as of May 30, 2018, MySQL Utilities is covered under Oracle Sustaining Support. Some features of Utilities are on the roadmap for Shell, users are encouraged to migrate to MySQL Shell.

So closing this bug report.