- Issue created by @quietone
- π¬π§United Kingdom catch
This was originally added in #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility β , utf8mb4 has been around for a very long time now, so I wonder whether it's possible to have a client installed that could run into this error any more. Maybe we can just drop the constants and supporting code.
- π¬π§United Kingdom longwave UK
I am pretty sure we could drop this now, surely nobody is building PHP 8.3 linked to much older versions of mysqlnd or libmysqlclient.
- π³πΏNew Zealand quietone
In anticipation of agreement to remove them I made an MR
- Status changed to Needs work
10 months ago 11:20am 3 April 2024 - ππΊHungary GΓ‘bor Hojtsy Hungary
I also expect that we can drop it but I did not validate that.
There is also still this error message produced that is misleading (specifies a much lower version of MySQL):
// Detect utf8mb4 incompatibility. if ($e->getCode() == Connection::UNSUPPORTED_CHARSET || ($e->getCode() == Connection::SQLSTATE_SYNTAX_ERROR && $e->errorInfo[1] == Connection::UNKNOWN_CHARSET)) { $this->fail(t('Your MySQL server and PHP MySQL driver must support utf8mb4 character encoding. Make sure to use a database system that supports this (such as MySQL/MariaDB/Percona 5.5.3 and up), and that the utf8mb4 character set is compiled in. See the <a href=":documentation" target="_blank">MySQL documentation</a> for more information.', [':documentation' => 'https://dev.mysql.com/doc/refman/5.0/en/cannot-initialize-character-set.html']));
It may still be possible to configure a DB without this? If that is the case, I would remove the very old version number reference, since Drupal 11 is by far not compatible with that anyway, so having MySQL 5.5.4 would not help users, despite what the message says.
- π¬π§United Kingdom longwave UK
libmysqlclient 5.5.3 shipped with MySQL 5.5.3 which was released in 2010 and was end of life in 2018, so in my opinion we can drop support for this now given that we do not support old PHP or database versions.
The mysqlnd check can also be dropped, the PHP version and mysqlnd versions are the same since PHP 7.4: https://github.com/php/php-src/commit/37043e07dfa57dbc567b7217ca7aa25a13...
- Status changed to Needs review
10 months ago 1:06pm 3 April 2024 - π¬π§United Kingdom longwave UK
Also removed the utf8mb4 fallback code noted in #6 given we don't support those versions any more.
- Status changed to RTBC
10 months ago 6:31am 4 April 2024 - Status changed to Needs work
10 months ago 10:00pm 4 April 2024 - Status changed to Needs review
10 months ago 12:53am 5 April 2024 - Status changed to RTBC
10 months ago 12:19pm 5 April 2024 - π¬π§United Kingdom longwave UK
Review was addressed.
clientVersion()
isn't part of the interface, isn't used in core, but GitLab search finds many false positives so I can't be sure it's unused in contrib - it isn't doing any harm by keeping it anyway. - Status changed to Fixed
10 months ago 12:30pm 5 April 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 28d407eb05 to 11.x and 1a4aa4ea0e to 10.3.x. Thanks!
Backported to 10.3.x because the minimum version of PHP is 8.1 there and too new for this stuff too.
-
alexpott β
committed 1a4aa4ea on 10.3.x
Issue #3437786 by quietone, longwave, catch, GΓ‘bor Hojtsy: Remove...
-
alexpott β
committed 1a4aa4ea on 10.3.x
-
alexpott β
committed 28d407eb on 11.x
Issue #3437786 by quietone, longwave, catch, GΓ‘bor Hojtsy: Remove...
-
alexpott β
committed 28d407eb on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.