Bug #108325 Contribution by Tencent: Some confusing code in function innobase_get_cset_width
Submitted: 30 Aug 2022 2:36 Modified: 30 Aug 2022 12:48
Reporter: hao wu (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[30 Aug 2022 2:36] hao wu
Description:
At the beginning of function innobase_get_cset_width(), will get desired charset through the global variable all_charsets.

It seems that using get_charset() is more suitable, because the charset may not be a MY_CS_COMPILED charset, and probably has not been loaded from corresponding .xml file so far, but that can be correctly handled in get_charset()

How to repeat:
Code review 

Suggested fix:
Let me know if I missed something :)
[30 Aug 2022 12:48] MySQL Verification Team
Hi Mr. wu,

Thank you for your bug report.

We think that your idea makes lots of sense, which is why we are verifying this report.

Verified as a feature request.