Bug #92534 MySQL Workbench displays incorrect collation in Alter Table
Submitted: 22 Sep 2018 8:58 Modified: 23 Sep 2018 20:53
Reporter: D Tucny Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any

[22 Sep 2018 8:58] D Tucny
Description:
After creating a table with "CHARSET=utf8mb4 COLLATE=utf8mb4_bin", opening "Alter Table" shows "Charset/Collation: utf8mb4 utf8mb4_0900_ai_ci", rather than the expected collation of "utf8mb4_bin".

The collation utf8mb4_0900_ai_ci being first in the drop down list may point to a problem with not activating the correct value on screen render.

How to repeat:
CREATE SCHEMA `testschema` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ;

CREATE TABLE `testschema`.`testtable` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `testname` VARCHAR(45) NULL,
  PRIMARY KEY (`id`));

; confirm inherited charset and collation
SHOW CREATE TABLE testschema.testtable;
| testtable | CREATE TABLE `testtable` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `testname` varchar(45) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

Open testschema.testtable in MySQL Workbench Alter Table, see "Charset/Collation: utf8mb4 utf8mb4_0900_ai_ci".

Suggested fix:
Alter table should correctly show the defined charset and collation.
[23 Sep 2018 20:53] Miguel Solorzano
Thank you for the bug report.