Bug #95144 Overriding server default charset/collation affects upgrade
Submitted: 26 Apr 2019 7:14 Modified: 8 May 2019 14:12
Reporter: Sivert Sørumgård Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Dictionary Severity:S3 (Non-critical)
Version:8.0.16 OS:Any
Assigned to: CPU Architecture:Any

[26 Apr 2019 7:14] Sivert Sørumgård
Description:
Running an upgrade that updates meta data may be affected if the server default character set and collation is overridden.

Workaround is to do the upgrade without the overridden defaults, then restart the server with the requested defaults.

How to repeat:
Initialize a server with e.g. mysql 8.0.11. Upgrade to e.g. 8.0.17 using e.g. --character-set-server=utf8 --collation-server=utf8_unicode_ci. One of the SQL statements updating the meta data will fail with error message 'Illegal mix of collations (utf8_general_ci,COERCIBLE) and (utf8_unicode_ci,COERCIBLE) for operation '=''.

Suggested fix:
Make server side execution of SQL statements immune to overridden server default character sets and collations.
[8 May 2019 14:12] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.17 release, and here's the changelog entry:

When performing a upgrade, server-side SQL statements that update data
dictionary tables used a non-default collation, causing an upgrade
failure.