Bug #118920 | Optimize: change CHAR column charset from utf8mb3 to utf8mb4 can Inplace | ||
---|---|---|---|
Submitted: | 1 Sep 11:29 | Modified: | 4 Sep 1:34 |
Reporter: | George Ma (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.43 | OS: | Any |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
Tags: | DDL |
[1 Sep 11:29]
George Ma
[3 Sep 10:07]
MySQL Verification Team
Hi, Thank you for your report. 63 will work, 64 won't "fit" as the utf8mb4 uses 4 bytes and utf8mb3 uses 3 bytes per character. This is known, documented and expected behavior.
[4 Sep 1:34]
George Ma
Yes, I know this is the current limitation. What I want to discuss is that it's reasonable for the VARCHAR type to have this limitation because it needs to store the actual length, which could be 1 byte or 2 bytes. However, the CHAR type doesn't need to store length information at all so this limitation could be directly removed.