Bug #60524 Wrong names shown in Select Changes to Apply step of model synchronization
Submitted: 18 Mar 2011 3:25 Modified: 18 Mar 2011 3:35
Reporter: Terry Nycum Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.33 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: case-sensitivity, synchronization, synchronize model

[18 Mar 2011 3:25] Terry Nycum
Description:
There appears to be a problem grabbing the strings for the names of entities existing on the database side for display at the "Select Changes to Apply" step of the Synchronize Model with Database wizard. If there are tables/views whose names differ only in case, the name of one of them is used for all of them.

Originally I thought the problem was in the actual logic that determines the entity mappings--that it was actually mapping entities case-insensitively and multiple times, but now I don't think that's the case:

Despite appearing to be under the impression that names have changed, affected mappings are not pre-selected for update when you arrive at that step. If those mappings are selected manually and then changes reviewed, the statement preview is empty. So the logic appears to know that no renaming is needed.

This is consistent with the empty report you'll see if you opt to Database > "generate catalog diff report" instead. This occurs regardless of whether the model or live instance is assigned to the left side of the comparison.

How to repeat:
Connect to a server that allows case-sensitive table names.

CREATE DATABASE test;
USE test;
CREATE TABLE AA (col1 TINYINT);
CREATE TABLE aa (col1 TINYINT);
CREATE VIEW BB AS (SELECT * FROM AA);
CREATE VIEW bb AS (SELECT * FROM aa);

Create EER model from existing database.
Select connection and schema `test`.
Leave both tables and both views selected.
Deselect "Place imported objects on a diagram".
Click 'execute'.
Database > Synchronize.
Select connection and schema `test`.
Leave both tables and both views selected.
Proceed to Model and Database Differences step.
Notice names displayed on database side.
Select all mappings and click "Update source".
Click Next.
Notice the empty statement set.
[18 Mar 2011 3:35] Terry Nycum
The connection reset error with which the submission form consistently responds is apparently erroneous.