Bug #110742 Unable to CREATE a schema or table with utf8mb4_general_ci

Submitted: 20 Apr 2023 6:03 Modified: 20 Apr 2023 11:02
Reporter: Christopher Lorenz Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.33 OS:Any
Assigned to: CPU Architecture:Any
Tags: 8.0, collation, default value, sql generation error

[20 Apr 2023 6:03] Christopher Lorenz
Description:
If I create a schema or table using the GUI editor in Workbench on a MySQL 8.0.x Database with default collation other than utf8mb4_general_ci it will create a schema or table with the deafault collation of the database (e.g. utf8mb4_0900_ai_ci if not change in MySQL 8.0.x).

I need to ALTER TABLE oder ALTER SCHEMA after creation of the object. There it works as expacted.

In the apply-preview the "COLLATE=utf8mb4_general_ci" is missing in SQL query. If I choose a colllation other than utf8mb4_general_ci the collation will be added. Also if I choose the collation of the database (utf8mb4_0900_ai_ci) this wil be added.

How to repeat:
- Using a MySQL 8 Database default installation
- Click on Create Schema
- Choose utf8mb4
- Choose utf8_general_ci
- Apply
- The Applay windows shows Query without COLLATE
- After appling the SQL the schema is create with wrong collation

=> The same steps can be used to create a table to reproduce the error

Suggested fix:
Always append the COLLATE = Paramater to generated SQL if not "Default Collation" is selected.
[20 Apr 2023 6:04] Christopher Lorenz
Preview with Missing COLLATE in SQL

Attachment: Missing collation utf8mb4_general_ci.png (image/png, text), 33.74 KiB.

[20 Apr 2023 9:49] MySQL Verification Team
Hello Christopher Lorenz,

Thank you for the bug report.
Imho this is duplicate of Bug #92725, please see Bug #92725.

Regards,
Ashwini Patil
[20 Apr 2023 11:02] Christopher Lorenz
This ticket was closed with Duplicate #92725 but this Bug reports describe the problem, that an wrong/uncomplte SQL is generared which creates a table or schema with wrong collation. 

This bug isn't not about the size of the dropdown.

Please reopen this bug!
[20 Apr 2023 11:28] MySQL Verification Team
Hello Christopher Lorenz,

Sorry for the inconvenience.
Imho this is duplicate of Bug #92534, not Bug #92725. Please see Bug #92534.

Regards,
Ashwini Patil

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.