Bug #106419 UpgradeChecker -> functions in generated columns that change in next version
Submitted: 9 Feb 2022 15:19 Modified: 4 Apr 2022 15:42
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Shell Upgrade Checker Severity:S4 (Feature request)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[9 Feb 2022 15:19] Shane Bester
Description:
See:
 https://bugs.mysql.com/bug.php?id=106418

It would have been convenient if 8.0.28 UpgradeChecker would have pointed out caution for any tables using generated columns containing CAST/CONVERT as those functions return values have changed in 8.0.28.

This means results could differ for generated columns and many other unexpected problems can arise (e.g. index corruption,  replication breakage (unable to find row)).

How to repeat:
See:
 https://bugs.mysql.com/bug.php?id=106418

Suggested fix:
A warning to read up in the release notes could help so that users can address the issues BEFORE upgrading (since downgrades are not possible).  Apply this to any function whose return value might differ in newer versions (requires optimizer devs to inform shell devs of such).
[10 Mar 2022 16:17] Alfredo Kojima
Posted by developer:
 
The issue is now documented at https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-sql-ch...
and https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_convert
and https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-28.html#mysqld-8-0-28-charset
[4 Apr 2022 15:42] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL Shell 8.0.30:

MySQL Shell's upgrade checker utility util.checkForServerUpgrade() now checks for indexes on generated columns using CONVERT(),which changed its behavior in MySQL 8.0.28, and warns you to check applications that rely on the previous behavior.