Bug #92869 WB Synchronize with Any source, Migration Wizard, Federated Tables connection
Submitted: 19 Oct 2018 19:41 Modified: 22 Oct 2018 6:40
Reporter: Christian Jacobs Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any
Tags: Connection Migration, federated table

[19 Oct 2018 19:41] Christian Jacobs
Description:
MySQL allows to create a federated table using create server
(see MySQL doc for details: https://dev.mysql.com/doc/refman/5.7/en/federated-create-server.html)

When you try to use the MySQL Workbench Feature "Synchronize with Any Source" (or Migration Wizard), in order to sync a schema, the create statement for federated tables using create server (as described above) is incomplete - the connection information with the server (mysql.servers) is missing in the sync-script.

Example Source-Side (Correct):
CREATE TABLE `test` (
  `idtest` int(11) NOT NULL AUTO_INCREMENT,
  `testtext` varchar(150) NOT NULL,
  PRIMARY KEY (`idtest`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb4 CONNECTION='remoteserver/test';
#remoteserver is defined in mysql.servers

WB output using sync with any source:
CREATE TABLE `test` (
  `idtest` int(11) NOT NULL AUTO_INCREMENT,
  `testtext` varchar(150) NOT NULL,
  PRIMARY KEY (`idtest`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb4;

The script fails without stating the connection.

Fun Fact: If you right click on the federated table (source-side), click on "copy to clipboard" and then click on create-statement, the connection is listed correctly.

How to repeat:
Create the table mentioned above in your db + create necessary server (see doc-link above).

Using feature sync with any source, in order to create the same federated table in another schema.

Rest is described above.

Suggested fix:
Include connection in the sync-script.
Maybe the same code as for "copy to clipboard => create statement" can be reused here?
[22 Oct 2018 6:40] MySQL Verification Team
Hello Christian Jacobs,

Thank you for the report.

regards,
Umesh