Skip to content

Corrective changes for charset/collate with v16 on EL9 #1639

Open
@sircubbi

Description

@sircubbi

Describe the Bug

#1619 changed the default-settings for charset from utf8 to utf8mb3 (and the collation accordingly), however MariaDB before 10.6 still reports utf8mb3 as utf8.

Therefore every puppet run reports corrective changes, unless you explicitly provide proper charset/collate manually.

Expected Behavior

Puppet should run without corrective changes

Steps to Reproduce

Steps to reproduce the behavior:

  1. use stock EL9 system which comes with MariaDB 10.5 by default
  2. create a database with mysql::db (without specifying a charset/collate)
  3. run puppet several times and see corrective changes:
Info: Applying configuration version 'puppet-production-96de84926e6'
Notice: /Stage[main]/Profile::Server::XXX/Mysql::Db[YYY]/Mysql_database[YYY]/charset: charset changed 'utf8' to 'utf8mb3' (corrective)
Notice: /Stage[main]/Profile::Server::XXX/Mysql::Db[YYY]/Mysql_database[YYY]/collate: collate changed 'utf8_general_ci' to 'utf8mb3_general_ci' (corrective)

Environment

  • Modul v16
  • RockyLinux 9
  • MariaDB 10.5.22

Additional Context

utf8mb3 is an alias for utf8 in MariaDB-Versions older than 10.6 (see https://mariadb.com/docs/server/ref/mdb/character-sets/utf8mb3/ -> Collation name changed in MariaDB Community Server 10.6.1 from utf8_general_ci to utf8mb3_general_ci)

Therefore on a default installation of EL9 it gets reported as utf8/utf8_general_ci:

> show variables like '%_database';
+------------------------+-----------------+
| Variable_name          | Value           |
+------------------------+-----------------+
| character_set_database | utf8            |
| collation_database     | utf8_general_ci |
| skip_show_database     | OFF             |
+------------------------+-----------------+
3 rows in set (0.020 sec)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions