[wp-trac] [WordPress Trac] #54841: wpdb::has_cap utf8mb4_520 detection does not work properly
WordPress Trac
noreply at wordpress.org
Tue Aug 23 01:10:41 UTC 2022
#54841: wpdb::has_cap utf8mb4_520 detection does not work properly
---------------------------+-----------------------------
Reporter: jamieburchell | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.1
Component: Database | Version: 5.8.3
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: => has-patch
* owner: (none) => SergeyBiryukov
* status: new => accepted
* milestone: Awaiting Review => 6.1
Comment:
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:
* PHP 8.0.16 or later: `10.6.8-MariaDB`
* PHP 8.0.15 or earlier: `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:
* [https://github.com/php/php-src/issues/7972 php-src: #7972: MariaDB
version prefix 5.5.5- is not stripped]
* [https://github.com/php/php-src/pull/7963 php-src: PR #7963 Fix GH-7932:
MariaDB version prefix not always stripped]
[attachment:"54841.diff"] follows [53919] / #53623 and makes an adjustment
to `wpdb::has_cap()` to check for the correct MariaDB version. It looks
like `utf8mb4_520` is
[https://mariadb.com/docs/reference/mdb/collations/utf8mb4_unicode_520_ci/
available in MariaDB since version 10.2], so the test checks for that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54841#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list