Site Health: Standardize on SELECT VERSION()
query for checking the database server version, due to the MariaDB version declaration potentially causing issues in production environments.
Partially reverts [45691]. Props Clorith. Fixes #47738. git-svn-id: https://develop.svn.wordpress.org/trunk@45904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2d0cb482ed
commit
83efbc67e3
@ -719,7 +719,7 @@ class WP_Debug_Data {
|
||||
$extension = null;
|
||||
}
|
||||
|
||||
$server = $wpdb->db_version();
|
||||
$server = $wpdb->get_var( 'SELECT VERSION()' );
|
||||
|
||||
if ( isset( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) {
|
||||
$client_version = $wpdb->dbh->client_info;
|
||||
|
@ -132,7 +132,6 @@ class WP_Site_Health {
|
||||
private function prepare_sql_data() {
|
||||
global $wpdb;
|
||||
|
||||
if ( method_exists( $wpdb, 'db_version' ) ) {
|
||||
if ( $wpdb->use_mysqli ) {
|
||||
// phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info
|
||||
$mysql_server_type = mysqli_get_server_info( $wpdb->dbh );
|
||||
@ -141,8 +140,7 @@ class WP_Site_Health {
|
||||
$mysql_server_type = mysql_get_server_info( $wpdb->dbh );
|
||||
}
|
||||
|
||||
$this->mysql_server_version = $wpdb->db_version();
|
||||
}
|
||||
$this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );
|
||||
|
||||
$this->health_check_mysql_rec_version = '5.6';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user