Bug #92128 | definer does not exist when issuing the command dba.getCluster() | ||
---|---|---|---|
Submitted: | 22 Aug 2018 15:32 | Modified: | 25 Nov 2019 10:05 |
Reporter: | Truphone DBA | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Shell AdminAPI InnoDB Cluster / ReplicaSet | Severity: | S3 (Non-critical) |
Version: | 8.0.12 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[22 Aug 2018 15:32]
Truphone DBA
[23 Aug 2018 5:52]
MySQL Verification Team
Hello! Thank you for the report, steps to reproduce the issue. Verified as described. regards, Umesh
[24 Aug 2018 10:46]
Truphone DBA
Thanks Umesh for taking take of this Bug. Adding, if anyone else does stumble with this issue, possible workarounds: -Connect to a primary node -Set connectToPrimary to false, something like: dba.getCluster('myCluster',{connectToPrimary: false}) Kind Regards, Truphone DBA
[20 Sep 2018 17:57]
Miguel Araujo
Posted by developer: The issue seen is caused by the renaming of the clusterAdmin which is the definer of internal VIEWS created by the Shell when the cluster is created. Since the user does not exist anymore (it was renamed), the views cannot be executed anymore. Workaround: If renaming the user is really necessary, the VIEWS (schema_version) must be altered beforehand the renaming in order to change the definer to be the "new" user.
[25 Nov 2019 10:05]
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.19 changelog: If you changed the name of the clusterAdmin user once a cluster had been created, you could encounter an error such as The user specified as a definer does not exist. This was because the clusterAdmin user was used as the DEFINER of the views required by InnoDB cluster, and if this user is renamed then the definer is in effect missing. In version 8.0.19 the InnoDB cluster metadata has been changed to avoid this problem, use dba.upgradeMetadata() to upgrade the cluster. Clusters deployed with 8.0.19 and later do not suffer from this issue.