Make WordPress Core

Opened 12 months ago

Closed 8 months ago

Last modified 8 months ago

#60096 closed task (blessed) (fixed)

Remove back-compat for database servers that don't support utf8mb4

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.5
Component: Database Keywords: has-patch has-unit-tests early
Focuses: Cc:

Description

Since [57173] the minimum supported version of MySQL is 5.5.5, which means the utf8mb4 charset is supported by all supported database servers. The back-compat code for handling servers that don't support it can therefore be removed, along with related tests and health checks.

Change History (9)

This ticket was mentioned in PR #5787 on WordPress/wordpress-develop by @johnbillion.


12 months ago
#1

  • Keywords has-patch has-unit-tests added; needs-patch removed

#2 @swissspidy
10 months ago

@johnbillion How comfortable are you with this change? Feels a bit late now in the cycle to merge this.

#3 @johnbillion
10 months ago

  • Milestone changed from 6.5 to 6.6

This needs some more testing to verify that everything is covered in the tests and there's no situation where a server running MySQl/MariaDB 5.5.5 or higher would not have support for utf8mb4.

Pinging a few people who may be able to confirm: @craigfrancis @l1nuxjedi @olliejones

#4 @l1nuxjedi
10 months ago

Can confirm. utf8mb4 was added in MySQL 5.5, somewhere around a decade ago. All versions of MariaDB support it. I have very high hopes that no one is still using MySQL 5.1 for anything.

#5 @craigfrancis
10 months ago

While I've not checked the full patch, I'm happy with the removal because it's only doing version number checking - i.e. checking 5.5.3 or greater from mysqli_get_server_info() and mysqli_get_client_info() (with an exception for mysqlnd; 5.0.9).


Semi-related #58871, adding support for utf8mb4_uca1400_ai_ci (MariaDB) or utf8mb4_0900_ai_ci (MySQL), that's likely to get a bit more complicated, as we can't (as easily) use version number checking.

#6 @OllieJones
10 months ago

The release notes for the MySQL 5.5 version series are here. https://downloads.mysql.com/docs/mysql-5.5-relnotes-en.pdf

They state that version 5.5.3 (24-March-2010) was the first version in which utf8mb4 appeared. See page 159 of that big pdf. That was a major feature release.

MariaDB's 5.5 series started with 5.5.20 (25-Feb-2012). https://mariadb.com/kb/en/release-notes-mariadb-55-series/

So, semantic version checking of version 5.5.3 should be fine to reject older MySQL versions. 5.5.5 is also fine.

The WordPress stats page (https://wordpress.org/about/stats/) unfortunately doesn't discriminate between point releases of MySQL / MariaDB, instead bundling 5.5.x into a single percentage (12.7% as of late Feb 2024). I suspect almost everybody has upgraded beyond 5.5.3.

Uploads from users of my indexing plugin show nothing earlier than MariaDB 5.5.68. But that doesn't mean much of anything: my plugin's users are self-selecting.

Last edited 10 months ago by OllieJones (previous) (diff)

#7 @johnbillion
10 months ago

  • Keywords early added

#8 @johnbillion
8 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 57926:

Database: Remove back-compat for database servers that don't support utf8mb4.

Since WordPress 6.5, the minimum supported version of MySQL and MariaDB is 5.5.5. This means all supported database servers now support the utf8mb4 character set and therefore the conditional logic for this is no longer necessary.

Props l1nuxjedi, craigfrancis, OllieJones, johnbillion

Fixes #60096

Note: See TracTickets for help on using tickets.