#109381DBAL: auto-detect server-version might be wrong/fail
Description
The error:
WITH not supported for current connection”
But the DB is MariaDB 10.11.7 — which fully supports CTEs.
Seems that DBAL 4.x did not auto-detect the connection as MariaDB and fell back to MySQL platform rules, which require MySQL 8.0+ for CTE support.
The fix is to set the server-version manually to avoid the exception:
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['serverVersion'] = 'mariadb-10.11.7';
Also the environment status has the (false) hint:
> MariaDB version too low
> Your MariaDB version 5.5.30 is too old. TYPO3 CMS does not run with this version. Update to at least MariaDB 10.4.3
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] DBAL: auto-detect server-version might be wrong/fail Resolves: #109381 Releases: main
History 6
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-03-26T17:33:21+00:00" > 03/26/26, 17:33 </span> -
Ralf Hübner commented <span data-processor="relativetime" data-value="2026-03-31T13:17:20+00:00" > 03/31/26, 13:17 </span>
Typo3: 13.4.27
DBAL: 4.3.5
Database: 10.11.7-MariaDB-1:10.11.7+maria~ubu2204 -
Stefan Bürk changed assigned to Stefan Bürk <span data-processor="relativetime" data-value="2026-03-31T17:08:15+00:00" > 03/31/26, 17:08 </span>
-
Stefan Bürk commented <span data-processor="relativetime" data-value="2026-04-11T09:56:31+00:00" > 04/11/26, 09:56 </span>
@Heural First, thank you for the report.
> Typo3: 13.4.27
> DBAL: 4.3.5
> Database: 10.11.7-MariaDB-1:10.11.7+maria~ubu2204I run a lot of different tests trying to reproduce the reported issue
that the wrong platform/driver is used and CTE is not working, but
failed on the whole line.Doctrine DBAL has exactly for that code in place to deal with these
kind of issues, special when linux distribution reports prefixed and
modified versions, for example:> 5.5.5-10.11.7-MariaDB-1:10.11.7+maria~ubu2204-log mariadb.org binary distribution
I even went down and hardcoded the version in the corresponding places doctrin reads
the version from the database and still the correct driver and platform are loaded.TBH I only tested current `13.4-dev` and `main (14.3-dev)` with Doctrine DBAL~4.4.3,
but from looking into the code of `4.3.5` the corresponding checks have not been
touched.I also used `serverVersion` and setting it to
> 5.5.5-10.11.7-MariaDB-1:10.11.7+maria~ubu2204-log
and it still worked as expected.
The environment check pretty much tells me
> MariaDB version 10.11.7 is fine
What puzzle me is the mentionent check report from you:
> MariaDB version too low
> Your MariaDB version 5.5.30 is too old. TYPO3 CMS does not run with this version. Update to at least MariaDB 10.4.35.5.30 ? That is really weired, doctrine strips `5.5.5-` prefixes only at the related code places,
or the real reported version is kind of different.However, here I can only guess and that needs to be investigagted (debuged) on your system why it fails.
In the end, I don’t care to report the issue upstream for doctrine/dbal and also try to coordinate a
solution, but without having a glue what exactly wents wrong there is no change that anything can be
done to fix it because we simply don’t know what. In any case, if that is reproducable and related to
the doctrine/dbal detection that needs to be done upstream, we don’t fix that only on our side as other
non-TYPO3 application and frameworks may hit the same issue and keep the open source spirit up.Can you please provide more information or debug this a little bit so we can proceede here ?
For example, use the cli tool to connect to the server with the same credential used for the TYPO3 system,
for example:$ mysql -h127.0.0.1 -uroot -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 389 Server version: 5.5.5-10.11.7-MariaDB-1:10.11.7+maria~ubu2204-log mariadb.org binary distribution ...and provide the complete `Server version: …` line here ?
Using `serverVersion` is the way to fix this in case autodetection does not work, and TYPO3 does
not really intercept here and any issues/failures should be passed to doctrine to fix it at the
correct place.Maybe you can describe your whole setup a little bit more ?
Because @supergarv had a good question, which has not been answered yet:
> Are you running the connection on a sql proxy?
and I would add here `or a read/write or master/slave connection configuration` ?
-
Ralf Hübner commented <span data-processor="relativetime" data-value="2026-04-20T08:31:20+00:00" > 04/20/26, 08:31 </span>
Hi,
here the insights:
Yes, its a Galera Cluster with master-slave configuration.Server: Test-Cluster (192.168.x.x via TCP/IP)
Server-Typ: MariaDB
Server-Version: 10.11.7-MariaDB-1:10.11.7+maria~ubu2204 – mariadb.org binary distribution
Protokoll-Version: 10
Server-Zeichensatz: UTF-8 Unicode (utf8mb3) -
Benni Mack commented <span data-processor="relativetime" data-value="2026-10-24T07:23:06+00:00" > 10/24/26, 07:23 </span>
Thanks for the details, the Galera hint helps a lot.
I’m fairly sure the cause is a SQL proxy (ProxySQL or MaxScale) in front of the cluster, not Doctrine’s detection itself. The version 5.5.30 from the environment check gives it away: if I remember correctly, it’s ProxySQL’s default value for
mysql-server_version. A proxy sends that string to the client when the connection opens, instead of the backend’s real version.Doctrine DBAL gets the server version from that handshake (
PDO::ATTR_SERVER_VERSION/ mysqliserver_info), not fromSELECT VERSION(). It uses the MariaDB platform only if that string contains “mariadb”. “5.5.30” doesn’t, so DBAL falls back to the plain MySQL platform. TYPO3 then refuses CTEs with “WITH not supported for current connection”. phpMyAdmin shows the real version because it reads it differently. That would also explain why we can’t reproduce this against a MariaDB server we connect to directly.Could you please check:
Which proxy do you use (ProxySQL, MaxScale, HAProxy, …)? Is TYPO3 connected to it instead of to a node directly?
If it’s ProxySQL: what does
SELECT * FROM global_variables WHERE variable_name = 'mysql-server_version';return on its admin interface?What is your full
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']configuration (without the password)? In particular, isserverVersionset at the top level, or belowprimary/replica?There are two ways to solve it:
- Set the version the proxy reports to the real backend version, e.g. in ProxySQL:
UPDATE global_variables SET variable_value = '5.5.5-10.11.7-MariaDB' WHERE variable_name = 'mysql-server_version'; LOAD MYSQL VARIABLES TO RUNTIME; SAVE MYSQL VARIABLES TO DISK;
- Or keep
'serverVersion' => 'mariadb-10.11.7'in the TYPO3 connection configuration, as you already did. That is the intended way to handle setups where autodetection can’t see the real server.Neither Doctrine nor TYPO3 can fix this upstream, because the client can only trust the version the server (here: the proxy) reports.
Your report did turn up a small bug on our side, though: the install tool’s version check doesn’t understand a configured
serverVersionin Doctrine’smariadb-x.y.zformat. It can’t parse it and reports a misleading result. I’ll create a separate issue for that, and we can handle the CTE part here once you confirm the proxy setup.
What is your exact version of:
- dbal
- typo3
- database (full “select version()”)
Are you running the connection on a sql proxy?