Bug #116110 Incomplete error message of 'ER_DD_UPGRADE_VIEW_COLUMN_NAME_TOO_LONG'
Submitted: 14 Sep 9:39 Modified: 15 Sep 6:10
Reporter: Huaxiong Song (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0.39 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[14 Sep 9:39] Huaxiong Song
Description:
We can see that during the upgrade from 5.7 to 8.0, an error may be thrown: ER_DD_UPGRADE_VIEW_COLUMN_NAME_TOO_LONG. The error content is: Upgrade of view \'%s.%s\' failed. Re-create the view with the explicit column name lesser than 64 characters.

But in fact, the error judgment basis comes from the function check_column_name. In fact, if the view contains a column ending with a space(due to historical reasons), check_column_name will also return an error. However, ER_DD_UPGRADE_VIEW_COLUMN_NAME_TOO_LONG will regard this problem as a column name that is too long, which sometimes causes confusion.

How to repeat:
It is hard to create view with a column including space ending. 
But we can simulate it by manually writing a view to .frm...

It is a code analysis, but we actually ran into this problem as well.

Suggested fix:
Modify the error message.
[14 Sep 9:43] Huaxiong Song
Minor correction of error message

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug#116110.patch (application/octet-stream, text), 1.48 KiB.

[15 Sep 6:10] MySQL Verification Team
Hello Huaxiong Song,

Thank you for the report and contribution.

regards,
Umesh