mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
A MariaDB server configured with --character-set-server=utf8 makes the roms table, string literals and JSON_TABLE columns utf8mb3, which breaks three places that a default utf8mb4 server accepts: - 0096/0101 pin `COLLATE utf8mb4_general_ci` on view output columns. An explicit utf8mb4 collation on a utf8mb3 value is rejected outright, so upgrading fails with "COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8mb3'". Each operand now goes through CONVERT(... USING utf8mb4) first, keeping the strong coercibility that 3758 needed. - 0098 compares JSON_UNQUOTE output against string literals in NOT IN, REGEXP and NULLIF. JSON_UNQUOTE resolves under the connection charset while a literal in a generated-column expression takes the table's collation, so the two are an illegal mix. All of them now route through _maria_text, which wraps the value in CAST(... AS CHAR). CI only ever exercised the default collation, so none of this was visible. The migrations workflow now runs MariaDB as a matrix over utf8mb4_general_ci and utf8mb3_unicode_ci. Service containers take docker create options and cannot pass --character-set-server, so the server is started from a step instead. MariaDB moves to 11.3.2 everywhere in CI, matching docker-compose. That image dropped the mysqladmin symlink, so the service health checks move to the image's own healthcheck.sh. Verified on mariadb:11.3.2: alembic upgrade head reaches head under both collations, and the generated_* columns and virtual_collections rows are identical between them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>