Bug #101966 Manual "Table Mapping" does not work in "Synchronize Model" function
Submitted: 10 Dec 2020 23:02 Modified: 14 Dec 2020 8:36
Reporter: Jan Hieronymus Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.22 OS:Windows (10 v2004)
Assigned to: CPU Architecture:x86

[10 Dec 2020 23:02] Jan Hieronymus
Description:
Using Database -> Synchronize Model, it may happen that the table mapping is not automatically derived. There is the button "Table Mapping", which can be used to adapt the table mapping. But the manual table mapping is completely ignored.

Contrary in Database -> Synchronize with Any Source, the manual Table Mapping works as expected.

How to repeat:
Create a new database, with a simple table, e.g.

CREATE DATABASE IF NOT EXISTS `bugs` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `bugs`;

CREATE TABLE `table` (
  `idtable` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `table`
  ADD PRIMARY KEY (`idtable`);

Synchronise this with a respective Workbench project.

Then, in the Workbench project change name from `table` to `table_wb_change` and in the databse server to `table_ext_change`.

Now, when using Database -> Synchronize Model to update the database server, you will get two tables: the Workbench `table_wb_change` and the external `table_ext_change`, which are not linked. Trying to fix this using the button "Table Mapping..." will open the appropriate dialog and you can match the tables, but when you hit "OK", this assignment will be ignored and the tables are still not linked.

Doing the same using Database -> Synchronize with Any Source will use the manual table assignment.

Suggested fix:
Use the Table Mapping source code from Database -> Synchronize with Any Source also for Database -> Synchronize Model.
[14 Dec 2020 8:36] MySQL Verification Team
Hello Jan Hieronymus,

Thank you for the bug report.
Verified as described.

Regards,
Ashwini Patil
[14 Dec 2020 8:37] MySQL Verification Team
8.0.22 test results

Attachment: 101966_test_results.docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document, text), 705.04 KiB.

[16 Feb 2022 14:21] Karel Kühpast
MySQL Workbench Community (GPL) for Windows version 8.0.28 CE build 1474738 (64 bit)
This bug is still not fixed.