[wp-trac] [WordPress Trac] #47738: Misleading database server version shown when using proxySQL
WordPress Trac
noreply at wordpress.org
Fri Aug 16 22:01:55 UTC 2019
#47738: Misleading database server version shown when using proxySQL
------------------------------------------+-----------------------------
Reporter: wpfed | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.2.3
Component: Site Health | Version: 5.2.2
Severity: minor | Resolution:
Keywords: has-patch commit fixed-major | Focuses:
------------------------------------------+-----------------------------
Comment (by Clorith):
So I just pushed this change to the Health Check plugin, which has shown a
possible issue with this implementation.
At some point, I don't know when, PHP's native drivers for MySQL seems to
have stopped stripping a prefix-hack away from the MariaDB version string,
making the use of `$wpdb->db_version()` give incorrect outputs in a lot of
cases.
I'm not sure if the right approach is to revert this and use the manual
approach like before, but in both locations, or to make changes to the
`db_version()` function call. (I see there's quite a few tickets about the
latter). The most accurate approach of course being to perform a SQL
query, but that's not reliable if an SQL connection doesn't exist (for the
core context at least).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47738#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list