Updating to mysql-server-5.7 (5.7.28-0ubuntu0.18.04.4) on Ubuntu produces the following error:
mysql_upgrade: [ERROR] 1833: Cannot change column 'table_name': used in a foreign key constraint 'innodb_index_stats_ibfk_1' of table 'mysql.innodb_index_stats'
The update appears to be changing the varchar length of the
Important Change; Partitioning: After creating partitioned InnoDB tables with very long names, the table_name columns in the corresponding entries in the mysql.innodb_index_stats and mysql.innodb_table_stats system tables were truncated. To fix this issue, the length of the table_name column in each of these tables has been increased from 64 to 199 characters. In both cases, this is now the same as the lengths of these columns in MySQL 8.0.
So I ended deleting that constraint: