Bug #82228 Incorrect sync string created
Submitted: 14 Jul 2016 12:25 Modified: 14 Jul 2016 13:48
Reporter: Paul Lautman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.3.7 build 1199 OS:Windows (7)
Assigned to: CPU Architecture:Any

[14 Jul 2016 12:25] Paul Lautman
Description:
When comparing two tables using "Database->Sychronize with Any Source...", Workbench is clearly detecting that a column with a specific collation is different from one without a specific collation, but it is not putting the collation in the ALTER TABLE command that it produces.

How to repeat:
Use the following two create statements to create tables in two separate databases:
CREATE TABLE p1.`ORDER_Details` (
  `legacyBatchNoIrecno` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

CREATE TABLE p2.`ORDER_Details` (
  `legacyBatchNoIrecno` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

(I have called the databases p1 and p2).

Use "Database->Sychronize with Any Source..." to produce changes to be applied. The resulting ALTER TABLE command will be:

ALTER TABLE `p2`.`ORDER_Details` 
CHANGE COLUMN `legacyBatchNoIrecno` `legacyBatchNoIrecno` VARCHAR(30) CHARACTER SET 'utf8' NULL DEFAULT NULL ;

When it should be:

ALTER TABLE `ORDER_Details` MODIFY COLUMN `legacyBatchNoIrecno`  varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

Suggested fix:
Make the utility produce the correct ALTER TABLE command.
[14 Jul 2016 13:48] Chiranjeevi Battula
Hello Paul Lautman,

Thank you for the bug report.
Verified this behavior on MySQL Workbench in 6.3.7 version

Thanks,
Chiranjeevi
[14 Jul 2016 13:48] Chiranjeevi Battula
Screenshot

Attachment: 82228.JPG (image/jpeg, text), 80.69 KiB.