if (!`SELECT count(*) FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user'
AND CHARACTER_SET_CLIENT='latin1'
AND COLLATION_CONNECTION='latin1_swedish_ci'`)
{
Skip Needs character_set_client=latin1 and collation_connection=latin1_swedish_ci in mysql.views;
}
--echo #
--echo # MDEV-20228 `mysql_upgrade` fails on every version upgrade: "ERROR 1267 (HY000) at line 7: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'"
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
SET sql_mode="";
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
--echo #
--echo # Changing character_set_client and collation_connection
--echo # for the VIEW mysql.user to utf8mb4/utf8mb4_unicode_ci,
--echo # to emulate that mysql.user was created by 'mysqld --bootstrap'