Opened 23 months ago
Closed 14 months ago
#54841 closed defect (bug) (fixed)
wpdb::has_cap utf8mb4_520 detection does not work properly
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 5.8.3 |
Component: | Database | Keywords: | has-patch |
Focuses: | Cc: |
Description
The wpdb::has_cap method returns false when testing for utf8mb4_520 support with MariaDB versions 10.3 and 10.5. These are the versions I was able to test. The version string for these returns as 5.5.5, which caps collation support at utf8mb4_unicode_ci. MariaDB 10.3 and 10.5 both have support for utf8mb4_520.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac! Thanks for the ticket.
I was able to reproduce the issue. In my testing, MariaDB version is reported differently between PHP versions, see comment:33:ticket:49364:
10.6.8-MariaDB
5.5.5-10.6.8-MariaDB
The latter includes PHP 7.4.x and PHP 5.6.x as well, where the version is also reported with the
5.5.5-
prefix.This was previously noted in comment:7:ticket:47738 and appears to be addressed in PHP 8.0.16 or later:
54841.diff follows [53919] / #53623 and makes an adjustment to
wpdb::has_cap()
to check for the correct MariaDB version. It looks likeutf8mb4_520
is available in MariaDB since version 10.2, so the test checks for that.