Bug #96306 Clone instance and hostnames with hyphens
Submitted: 24 Jul 2019 7:57 Modified: 9 Sep 2019 14:12
Reporter: Simon Mudd (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.0.17 OS:Any
Assigned to: CPU Architecture:Any

[24 Jul 2019 7:57] Simon Mudd
Description:
While trying to get cloning to work I had a lot of problems with hostnames which had a hyphen.
Documentation does not show examples or clarify how quoting should or can be done.

With mysql usernames we often see: user@host or 'user'@'host'

but real examples for this are not really provided in the docs.

How to repeat:
See: https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-remote.html

I tried the following:
 
works:   clone instance from user@10.200.200.200:3306 identified by 'xxxx';

does not: clone instance from 'user@host-999' identified by 'xxxx'

clone instance from user@host-9999:3306 identified by 'xxx';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-9999:3306 identified by 'xxx'' at line 1

It looks like the actual correct format is:

clone instance from user@'host-9999':3306 identified by 'xxx';

However, I don't see this well documented. I'd also expect that 'host-9999:3306' might be valid but again this is not clear.

Suggested fix:
Please clarify documentation here: https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-remote.html regarding:
* exact quoting requirements etc
* provide some examples

I could not see a CLONE INSTANCE SYNTAX type page which might be good to have, similar to the https://dev.mysql.com/doc/refman/8.0/en/drop-table.html type pages.  Doing that allows you to have a more detailed page on the full syntax with examples while the clone-plugin-remote can be somewhat more simplified and refer to this new page.
[25 Jul 2019 6:45] MySQL Verification Team
Hello Simon,

Thank you for the reasonable feature request!

regards,
Umesh
[9 Sep 2019 14:12] Daniel Price
Posted by developer:
 
CLONE examples were updated to include quotes. 
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-remote.html

A CLONE syntax page was added.
https://dev.mysql.com/doc/refman/8.0/en/clone.html

Account name guidelines are documented here:
https://dev.mysql.com/doc/refman/8.0/en/account-names.html

Thank you for the bug report.