[wp-trac] [WordPress Trac] #47738: Misleading database server version shown when using proxySQL
WordPress Trac
noreply at wordpress.org
Sun Jul 28 12:19:51 UTC 2019
#47738: Misleading database server version shown when using proxySQL
------------------------------+---------------------
Reporter: wpfed | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2.3
Component: Site Health | Version: 5.2.2
Severity: minor | Resolution:
Keywords: has-patch commit | Focuses:
------------------------------+---------------------
Changes (by Clorith):
* keywords: => has-patch commit
* milestone: Awaiting Review => 5.2.3
Comment:
I see the version check is doing it in two different ways here, and it
looks like the one done for the debug information lands on the proxy
server (relying on the connection details provided by
`mysqli_get_server_info`, which would be the proxy, while the site health
section actually performs an SQL query of `SELECT VERSION()`, so that's
the actual backend server.
After some investigating, it seems like the debug page is the correct
approach here, as doing version verification should be performed using
native features when possible.
These areas are also doing the checks within the code, and not using the
WP wrapper, we'll resolve this by moving both checks over to using
`WPDB::db_version()` (which uses `mysqli_get_server_info()` behind the
scenes at this time, and is what anything using WP should be checking
against).
[attachment:"47738.patch"] changes this behavior in both places. In your
case this does mean you'll receive a warning about a version mismatch in
the site health module as well in the future, unless the proxy server is
configured to report a version that matches the back-end server.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47738#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list