Review main Ready for review Quiet

94660[BUGFIX] Respect declared collations in reports collation check

André Buchmann CR +1 V +1 Hard +441 −16 updated 10/02/26, 17:33

Commit message

The "MySQL Database Character Set" check of the reports module
flags any table or column whose collation deviates from the
configured connection option defaultTableOptions/collation as
an error. The core itself declares sys_refindex.hash with
"CHARACTER SET ascii COLLATE ascii_bin". Such intended
deviations were reported as "mixed collations" errors.

The check now determines the CHARACTER SET / COLLATE declarations
from the expected schema and only reports tables and columns whose
collation deviates from both the connection default and an explicit
declaration. Columns of type "json" are ignored, since MariaDB
implements them as LONGTEXT with an enforced utf8mb4_bin collation
that cannot be influenced.

The expected schema is taken from SchemaMigrator, which is the same
source the schema migrator and the database analyzer work with: all
ext_tables.sql files, enriched by DefaultTcaSchema. The enrichment
is essential here, since columns that exist in TCA only - for
instance "type => json" fields like tx_scheduler_task.parameters or
form_definition.configuration - are not part of any ext_tables.sql
and would otherwise still be reported on a stock installation.
SchemaMigrator::parseCreateTableStatements() is made public for this.

Additionally, TableBuilder now sets the "collation" platform
option based on the parsed COLLATE option instead of the
CHARACTER option.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/60/94660/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/60/94660/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Simon Schaufelberger +1
  • Verified V +1 Needs a vote
    • Simon Schaufelberger +1
    • core-ci +1 CI

Merge conflicts 6

Issues 1

Files 7

Review log 812

  1. André Buchmann uploaded patch set 1 07/02/26, 15:03

  2. core-ci voted on patch set 1 V -1 07/02/26, 15:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104237

  3. André Buchmann uploaded patch set 2 V -1 07/03/26, 06:20

  4. core-ci voted on patch set 2 V +1 07/03/26, 06:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104262

  5. Simon Schaufelberger voted on patch set 2 CR +1 V +1 07/07/26, 00:32

  6. André Buchmann uploaded patch set 3 CR +1 V +1 08/06/26, 21:19

  7. core-ci voted on patch set 3 V +1 08/06/26, 21:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106065

  8. Oliver Klee voted on patch set 3 V +1 08/06/26, 21:58

  9. Simon Schaufelberger voted on patch set 3 CR +1 V +1 09/03/26, 09:04

  10. Anton Danilov uploaded patch set 4 CR +1 V +1 10/02/26, 15:54

    Resolving Merge Conflict
  11. core-ci voted on patch set 4 V +1 10/02/26, 16:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109966

  12. Simon Schaufelberger voted on patch set 4 CR +1 V +1 10/02/26, 17:33