Make WordPress Core


Ignore:
Timestamp:
03/12/2020 03:53:01 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Database: Introduce wpdb::db_server_info() to retrieve full MySQL server information string as supplied by mysqli_get_server_info().

This complements wpdb::db_version(), which only returns a numeric version string and strips any additional information, e.g. vendor name.

Props clarinetlord, birgire, webaware, pento.
Fixes #40037. See #27703.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/db/charset.php

    r47198 r47451  
    3030        self::$_wpdb = new WpdbExposedMethodsForTesting();
    3131
    32         if ( self::$_wpdb->use_mysqli ) {
    33             self::$server_info = mysqli_get_server_info( self::$_wpdb->dbh );
    34         } else {
    35             self::$server_info = mysql_get_server_info( self::$_wpdb->dbh );
    36         }
     32        self::$server_info = self::$_wpdb->db_server_info();
    3733    }
    3834
Note: See TracChangeset for help on using the changeset viewer.