Bug #54981 Formated view will sync allways
Submitted: 3 Jul 2010 14:15 Modified: 6 Jul 2010 13:35
Reporter: Martin Pirringer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.25 OS:Any (Windows 7, Mac OS X)
Assigned to: CPU Architecture:Any
Tags: Views

[3 Jul 2010 14:15] Martin Pirringer
Description:
Entering a multi line view will cause the view to sync always

How to repeat:
Enter a view in the format

CREATE <create part>
AS
SELECT <fieldlist>
FROM <table joins>
WHERE <where condition>

As instead a single line "sausage" in the way it is stored at the server

Suggested fix:
Allow formatting. 

Complex views are very difficult to maintain usually with a small change that, even though in correct syntax, is not in the "preferred format" will cause the view to sync every time. To get it to stop syncing one needs to "update the model" which destroys the formatting. It might be nice to even when updateing the model store the view in an easy readable way like

CREATE ....
AS
SELECT field1 AS field1aliasl,
   field 2,
   ......
FROM .....
JOIN.....
WHERE ....

etc
[4 Jul 2010 13:23] Valeriy Kravchuk
Thank you for the problem report. Verified just as described on Mac OS X.

There are similar bug report, like bug #52004, but this one highlights a serious problem for synchronization whenever views are used.
[6 Jul 2010 13:35] Alfredo Kojima
This is duplicate of bug #52004