Bug #94182 | not delete mysql_innodb_cluster_rxxx@'localhost' | ||
---|---|---|---|
Submitted: | 3 Feb 2019 11:49 | Modified: | 29 Mar 2019 11:14 |
Reporter: | Bin Hong (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Shell AdminAPI InnoDB Cluster / ReplicaSet | Severity: | S3 (Non-critical) |
Version: | 8.0.14 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | contributions |
[3 Feb 2019 11:49]
Bin Hong
[3 Feb 2019 11:50]
Bin Hong
add drop user with localhost
Attachment: drop_user.patch (application/octet-stream, text), 688 bytes.
[3 Feb 2019 11:54]
Bin Hong
modules/adminapi/mod_dba.cc if (!replication_user.empty()) { log_debug("Removing replication user '%s'", replication_user.c_str()); group_session->query("DROP USER IF EXISTS /*(*/" + replication_user + "@'localhost' /*)*/"); group_session->query("DROP USER IF EXISTS /*(*/" + replication_user + "@'%' /*)*/");
[4 Feb 2019 9:48]
MySQL Verification Team
Hello Bin Hong, Thank you for the report and contribution. Please ensure to re-send the patch via "Contributions" tab. Otherwise we would not be able to accept it. regards, Umesh
[5 Feb 2019 1:28]
Bin Hong
drop user localhost and % (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: drop_user.patch (application/octet-stream, text), 800 bytes.
[29 Mar 2019 11:14]
David Moss
Posted by developer: Thank you for your feedback, this has been fixed in upcoming versions and the following was added to the 8.0.16 changelog: In the event that dba.createCluster() failed and a rollback was performed to remove the created replication (recovery) users, the account created at localhost and any of the ipWhitelist addresses were not being removed. The fix ensures that the replication accounts are removed whenever a rollback related to dba.createCluster() is performed. This work was based on a code contribution from Bin Hong.
[16 May 2019 8:17]
Frederic Descamps
Hi Bin, Since the replication (recovery) users are created based on the 'ipWhitelist' (since 8.0.12 GA), whenever the option 'ipWhitelist' is used this patch won't work. Both scenarios (using or not 'ipWhitelist') must be considered thus a different patch has been pushed. Thank for the bug report and the contribution proposal.