Bug #65108 | View synchronization problem | ||
---|---|---|---|
Submitted: | 26 Apr 2012 7:39 | Modified: | 10 Jul 2013 23:31 |
Reporter: | khai nodd | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S3 (Non-critical) |
Version: | 5.2.39 CE | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[26 Apr 2012 7:39]
khai nodd
[26 Apr 2012 7:54]
Valeriy Kravchuk
Please, upload some .mwb file that demonstrates the problem.
[26 Apr 2012 8:00]
khai nodd
Model sample showing the problem
Attachment: sample.mwb (application/octet-stream, text), 5.04 KiB.
[26 Apr 2012 9:11]
Valeriy Kravchuk
Verified just as described using your .mwb file uploaded: mysql> use prueba; Database changed mysql> show tables; +------------------+ | Tables_in_prueba | +------------------+ | persona | | vistapersona | +------------------+ 2 rows in set (0.02 sec) mysql> select * from vistapersona; Empty set (0.00 sec) mysql> show tables; +------------------+ | Tables_in_prueba | +------------------+ | persona | +------------------+ 1 row in set (0.00 sec) mysql> select version(); +------------------+ | version() | +------------------+ | 5.1.62-community | +------------------+ 1 row in set (0.03 sec) while working with local MySQL server 5.1.62 on Windows XP. Looks like the problem is related to mixed case view name, vistaPersona, used in the model...
[6 Nov 2012 4:03]
Alfredo Kojima
Bug #67370 is a duplicate
[6 Nov 2012 4:15]
Alfredo Kojima
Bug #64719 is a duplicate
[16 Jan 2013 16:24]
Hugh Leighton
I've run into a similar problem: Synch drops some (but not all) views. Resynch recreates views that don't exist and drops others. All views have mixed case names in the model. A workaround that works for me: At the "Model and Database Differences" step of the synch wizard, select the views that currently exist in the source database and "Ignore" the update from the model. Hugh
[1 Jun 2013 22:19]
Alfredo Kojima
Bug #61945 is a duplicate of this
[21 Jun 2013 16:52]
Alfredo Kojima
Posted by developer: New oldModelSqlDefinition and oldServerSqlDefinition fields were added to db.View object. oldModelSqlDefinition is updated whenever a synchronization happens or when forward engineering to the server. oldServerSqlDefinition is updated whenever a synchronization happens, through a new back-synchronization step that occurs at the end of the sync wizard. The final definition of the view that is stored in the server is read back and stored in oldServerSqlDefinition. So, whenever a change occurs in the model, the comparison between sqlDefinition and oldModelSqlDefinition will flag a change. Likewise, whenever the server definition changes, the comparison between oldServerSqlDefinition and the sqlDefinition of the object reverse engineered from the server will flag a change. These fields are stored once for each target server, in a Sync Profile. This should solve the problem of the server rewriting the definition of views, which would cause it to never match what the user gave as the original DDL.
[10 Jul 2013 23:31]
Philip Olson
Fixed as of MySQL Workbench 6.0.3 (BETA 2), and here's the changelog entry: Database synchronization with a View would sometimes fail, and could remove the View. Thank you for the bug report.
[29 Aug 2014 11:20]
Georgi Sotirov
I'm not sure why this one is closed, as views area always synchronized (see also #64719) even in 6.2.x, which is quite irritating if you're a database designer and need to frequently apply modifications to different servers.