[wp-trac] [WordPress Trac] #31644: mysqli_get_client_version in wp-db

WordPress Trac noreply at wordpress.org
Thu Mar 26 07:38:01 UTC 2015


#31644: mysqli_get_client_version in wp-db
--------------------------+-----------------------
 Reporter:  filipac       |       Owner:  pento
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.2
Component:  Database      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------
Changes (by MattyRob):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Please can I get a quick sanity check on this issue.

 mysql_get_client_version() and mysqli_get_client_info() on my testing
 sites return an entirely different number to the MySQL database version.
 I'm using PHP 5.6.7 and MySQL 5.6.23 but these functions both return
 5.0.11 which is the version number of the client library (mysqlnd) on my
 system.

 According to this page:
 http://php.net/manual/en/mysqlnd.plugin.obtaining.php

 PHP versions and the library version numbers are not the same and so the
 comparison a little later in the code comparing the client version to
 5.5.3 is always returning a false.

 Should the code not use $client_version = mysqli_get_server_info(
 $this->dbh ); for example?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31644#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list