#110234Functional database tests fail on MariaDB 11.4 and newer
Description
Running the core functional database tests against MariaDB 11.4 produces 20
failures, while the same run is green on every earlier supported version.
Full runs of typo3/sysext/core/Tests/Functional/Database, 400 tests each:
MariaDB 10.4 OK, 0 failures (covered by nightly CI) MariaDB 10.11 OK, 0 failures MariaDB 11.0 OK, 0 failures MariaDB 11.1 OK, 0 failures MariaDB 11.2 OK, 0 failures MariaDB 11.3 OK, 0 failures MariaDB 11.4 20 failures <- first broken version MariaDB 11.8 2 errors, 6 failures
Reproduce with:
Build/Scripts/runTests.sh -s functional -d mariadb -i 11.4 \
typo3/sysext/core/Tests/Functional/Database
All 20 failures report
Schema probably polluted by previous test, unclean operation: change
raised in AbstractSchemaBasedTestCase::verifyCleanDatabaseState(), and all are
on data set #1 (true), the permutation which unsets defaultTableOptions.
That message is misleading. The failures are not follow up damage from one
polluting test: most of them fire at AbstractSchemaBasedTestCase.php:195, which
is the verifyCleanDatabaseState() call inside prepareTestTable(). The schema is
therefore already considered dirty immediately after TYPO3 itself created it,
in each test independently.
Root cause
MariaDB 11.4 introduced the UCA 14.0.0 collations and made them the server
default, for example utf8mb4_uca1400_ai_ci. Together with them a new
FULL_COLLATION_NAME column was added to
information_schema.COLLATION_CHARACTER_SET_APPLICABILITY, and for these
collations the name is split across two columns:
COLLATION_NAME uca1400_ai_ci (character set independent part) FULL_COLLATION_NAME utf8mb4_uca1400_ai_ci
information_schema.TABLES.TABLE_COLLATION reports the full name,
utf8mb4_uca1400_ai_ci.
ConnectionMigrator::getTableOptions() inner joins that table on
CCSA.collation_name = tables.table_collation
On MariaDB 11.4 this matches nothing, so the inner join silently removes every
affected table from the result set. The engine, row_format, charset and comment
options of those tables are then read as unset, and the schema analyzer
proposes changes which are already in place. Measured on a failing table:
actual state ROW_FORMAT = Dynamic, TABLE_COLLATION = utf8mb4_uca1400_ai_ci join result 0 rows suggested change ALTER TABLE `a_test_table` ROW_FORMAT = Dynamic
Applying that statement changes nothing, so the suggestion is offered again on
every run.
This also explains the data set dependency. With defaultTableOptions configured
(data set #0) the tables are created as utf8mb4_unicode_ci, which does exist as
a COLLATION_NAME, so the join matches and everything behaves. Only with
defaultTableOptions unset does the 11.4 server default apply and break the join.
Ruled out
The following were tested and are not the cause:
- “The database analyzer never converges on 11.4.” Not true. Running
getUpdateSuggestions(), applying the result and asking again converges on the
first round on 11.4, exactly as on 11.3. - “Data set #0 of the failing test leaves the residue.” Not true. Replicating
data set #0 in isolation leaves a clean schema on both 11.3 and 11.4. - “The expected collation is derived or compared incorrectly.” Not true. The
collation derivation in ConnectionMigrator and the hardcoded
utf8mb4_unicode_ci in SetupDatabaseService are not involved at all; both are
untouched by the fix.
Impact
Installations whose tables carry a uca1400 collation are affected. This is
the server default from MariaDB 11.4 onwards, so it applies to databases and
tables created without an explicit collation. For those installations the
database analyzer permanently offers engine, row_format and charset changes
which cannot be applied, because the underlying values are already correct and
the corresponding options are simply invisible to the comparison.
Installations set up through the install tool receive utf8mb4_unicode_ci and
are not affected.
Test coverage gap
This is currently invisible in CI because Build/gitlab-ci/nightly/functional.yml
runs only -d mariadb -i 10.4 and -i 10.10, and no pre merge job covers MariaDB
11.x at all. runTests.sh accepts 11.0 through 11.4 only, so MariaDB 11.7 and
11.8 cannot even be selected today, although 11.4 and 11.8 are long term
releases. Extending the version regex and the nightly matrix is handled
separately.
The platform elevation works correctly on 11.4, so this is unrelated to the
MariaDB 11.7 and newer elevation issue, which gets its own issue.
Reviews 5
History 39
-
Stefan Bürk changed description <span data-processor="relativetime" data-value="2026-07-20T08:05:20+00:00" > 07/20/26, 08:05 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 94843 status
NewUnder Review <span data-processor="relativetime" data-value="2026-07-20T08:07:31+00:00" > 07/20/26, 08:07 </span> -
Gerrit Code Review pushed patch set 2 for main to change 94843 <span data-processor="relativetime" data-value="2026-07-20T08:16:13+00:00" > 07/20/26, 08:16 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 94843 <span data-processor="relativetime" data-value="2026-07-20T08:18:44+00:00" > 07/20/26, 08:18 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 94843 <span data-processor="relativetime" data-value="2026-07-20T11:38:04+00:00" > 07/20/26, 11:38 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 94849 <span data-processor="relativetime" data-value="2026-07-20T17:08:40+00:00" > 07/20/26, 17:08 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 94850 <span data-processor="relativetime" data-value="2026-07-20T17:08:59+00:00" > 07/20/26, 17:08 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-07-20T17:25:12+00:00" > 07/20/26, 17:25 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-08-11T08:51:51+00:00" > 08/11/26, 08:51 </span>
Applied in changeset commit:562aac5a8dc758358e2d008e459eeb063a22358b.