Bug #59601 Synchronize Model fails with MRG_MyISAM tables
Submitted: 19 Jan 2011 6:24 Modified: 31 Jul 2013 2:35
Reporter: Eduardo Marin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.31 OS:MacOS (Revision 7115, Windows)
Assigned to: CPU Architecture:Any
Tags: merge, MRG_MyISAM, synchronize, Union Tables

[19 Jan 2011 6:24] Eduardo Marin
Description:
When a MRG_MyISAM table is created in a model, and the "Union Tables" field is defined in the Table "Options" tab with (schema.table_0,schema.table_1) then the synchronize model creates successfully the new table if the table_0, table_1 and the new table have the same structure.
But when trying to re-synchronize the model, WB creates the following SQL:

ALTER TABLE `schema`.`table` UNION = ((schema.table_0,schema.table_1)) ;

This SQL will not execute due to its malformation with double parenthesis in the UNION argument.

This bug was observed in older versions also (Not tried on other OSs).

How to repeat:
Using the graphical modeling, create two any identical MyISAM tables table_0, table_1, then create a MRG_MyISAM table with the same structure than table_0 or table_1 (Both are identical).
Synchronize model to create tables in the DB.
Try Synchronize model again and the malformed SQL is generated. (With double parenthesis).

Suggested fix:
Validate how should be handled the "Union Tables" argument in the "Options" tab to validate model against the DB.
[27 Jan 2011 18:52] Sveta Smirnova
Thank you for the report.

Verified as described on Windows Vista.
[31 Jul 2013 2:35] Philip Olson
Fixed as of MySQL Workbench 6.0.3, and here's the changelog entry:

Validation now checks for the required parenthesis with the "Union Tables"
argument during model synchronization, and adds them if they are missing.

Thank you for the bug report.